Orange3 Save Classifier Widget - orange

I have Orange3 installed with Python 2.7 32-bit on a Windows 10 OS. Everything seems to work okay and I have trained a Classification Tree and now want to save the model. When I add the Save Classifier widget and connect it to the Classification Tree, I cannot enter a File name. I've tried retraining the model with the Save Classifier widget attached, but still nothing. I have a Classification Tree Viewer attached and it works fine okay. Any suggestions on how I can create a .pickle file of my Classification Tree?

I figured out how to save a .pickle file with the Save Classifier. I "primed" the directory with a file I renamed to have the file type .pickle. Then the Orange Save Classifier allowed me to search and find this existing .pickle file and overwrite it. It works fine now.

Related

How to use Transfer Learning for Text classification in Apples Create ML?

I was watching https://developer.apple.com/videos/play/wwdc2019/428/, where Transfer Learning is used for text classification in Create ML.
I wanted to do the same and created Datasets with the following structure:
Folders where the Name of the Folder is the Label / Answer to a Question.
Inside each folder there are 10 text files with Questions.
Pretty much the same Idea like in the Video.
When I now choose Transfer Learning (like in the Video) and start to train, the Window tells me "Model has no Data" (see Screenshot).
Error Screenshot
What I am doing wrong ?
By looking at your Error Screenshot, you are missing the test data.

How to save models in pytorch from tpu to cpu

I am training a Neural Network model with pytorch.
Since this model is very complicated, I made use of the pytorch_xla package to use TPU. I finished training the model and now I want to save the weight so I will be able to use them from any envrionment.
I tried to save the data like so
file_name = "model_params"
torch.save(model.state_dict(), file_name)
and when I tried to load them (from environment which does not support TPU)
model.load_state_dict(torch.load(file name))
I got the following error
NotImplementedError: Could not run 'aten::empty_strided' with arguments from the 'XLA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'aten::empty_strided' is only available for these backends: [CPU, Meta, BackendSelect, Named, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, UNKNOWN_TENSOR_TYPE_ID, AutogradMLC, AutogradHPU, AutogradNestedTensor, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].
Is there a way to do what I want?

Matlab - replace classification layer using a script (automatically)

i want to train a neural network with flexible output size. In the beginning, i used the matlab deep network designer to manually replace the classification and fully connected layer to the desired output size. Now, i want to automatically replace it, using a script.
Which command is working for that?
Simply trying the line:
net.Layers(142,1).InputSize = 10;
gives me the error message
Unable to set the 'InputSize' property of class 'FullyConnectedLayer' because it is read-only.
Trying to replace the complete layer (not only inputsize) is resulting in the same error message.
Is this possible with matlab, and if yes, which commands will do the job?
Thanks in advance!
Okay, i think i solved it. When changing the network manually inside of the deepnetworkdesigner, there is the possibility to click "export code" which exports the desired code for the adapted output size

How can I create in Gehpi directed tree graph instead of sphererical

I want to make a network graph which shows the distribution of our documents in our folder structure.
I have the nodefile, edgefile and gephi graph file in this location:
https://1drv.ms/f/s!AuVfRBdVHkO7hgs5K9r9f7jBBAUH
What I do is:
Run the algorithm ForceAtlas2 with scaling 10-20, dissuade hub marked and prevent overlap marked, all other standard setting.
What I get is a graph with groups radial/spherical distributed. However, what I want is a tree directed network graph.
Anyone know how I can adjust Gephi to make this?
Thanks!
I just found a solution.
I tested the file format as shown on the Yed site "import excel file" page
http://yed.yworks.com/support/manual/import_excel.html
This gave me the Yed import dialog (took a life time to figure out that it's a pop up menu and not selectable through the standard menu)
Anyway, it worked and I've adjusted the test files with the data prepared for the Gehpi. This was pretty easy, I could used the source target ID's etc. Just copy paste.
I load it into Yed and used some directed and radial clustering algorithms on it. Works fine!
Below you can find the excel node/edge file used to import in Yed and the graph file you can open with Yed to see the final radial result.
https://1drv.ms/f/s!AuVfRBdVHkO7hg6DExK_eVkm5_mR
Only thing to figure out is how to combine the weight (which represents the number of documents) with the node size.
Unfortunately, as of version 0.9.0, Gephi no longer supports hierarchical graphs. Maybe try using a previous version?
Other alternatives involve more complex software, such as Graphviz, but you need a .dot file instead of your .csv. I looked all over, but could not find an easy-to-use csv to dot converter.
You could try looking at d3-hierarchy, a node.js program, but then again you need to use the not-so-user-friendly npm. If you look at the link, it looks like it can produce the kind of diagram you're looking for.

Caffe web demo error when running a model trained on Digits

I trained a neural network model on Digits and it seemed to run fine there.
Then i exported the trained model files and copied them into a different system running the standard caffe web demo.
I hoped to just be able to plug those files in and have them run in Caffe but i am getting an error.
Specifically I copied my model into bvlc_reference_caffenet.caffemodel, the deploy.prototxt into deploy.prototxt, and the mean.binaryproto into the ilsvrc_2012_mean.npy file.
However when I try to run it , it appears to not like the format of the mean.binaryproto file as indicated by the error message:
IOError: Failed to interpret file '/home/vagrant/caffe/python/caffe/imagenet/ilsvrc_2012_mean.npy' as a pickle
what am I doing wrong here? Do I need to process the mean.binaryproto file from Digits somehow before I use it with caffe?
You need to convert the .binaryproto file to a numpy file.
There is a nice example here using caffe.io and caffe.proto.