Running Memnet model using caffe - neural-network

I try to use the dataset of mnist, which is an example provided in github, to run Memnet model on the interface of cmd.
The model is downloaded from here
I modified its deploy.prototxt accordingly. Having no idea... Can someone help me with this?
But it keeps telling me something wrong going on, as the pic shows:

The command line interface should get as a -solver a solver.prototxt file (which has train_val.prototxt as one of its parameters). You cannot supply train_val.prototxt directly to caffe train.
You can look at the examples subfolder of caffe and find some examples of solver.prototxt. A simple one can be found in examples/mnist, you can check out lenet_solver.prototxt.

Related

Matlab converting library to model

I'm working on a script to convert a Simulink library to a plain model, meaning it can be simulated, it does not auto-lock etc.
Is there a way to do this with code aside from basically copy-pasting every single block into a new model? And if it isn't, what is the most efficient way to do the "copy-paste".
I was not able to find any clues as how to approach this problem here, or on Google, or on the official documentation or on the MathWorks forum so I'm at a loss on how to proceed.
Thank you in advance!
I don't think it's possible to convert a library to a model, but you can programmatically add library blocks to models like so:
sys = 'testModel';
new_system(sys);
open_system(sys);
add_block('Simulink/Sources/Sine Wave', [sys, '/MySineWave']);
save_system(sys);
close_system(sys);
sim(sys);
You could even use the find_system command to list all the blocks in a library and then loop through them all and create a new model for each using the above code.

How do I find selfor in Octave?

I need to implement unsupervised neural network using Octave. For that, I need to use "selforgmap" function. How do I find that function in octave or what are the packages include this function?
When I use "selforgmap", I got an error like this.
selforgmap
error: 'selforgmap' undefined near line 1 column 1
help selforgmap
error: help: 'selforgmap' not found
As of now there does not appear to be any implementation of selforgmap in octave or any of it's packages. The current neural net package, nnet, can be found at Octave Forge and the Function Reference link will show you everything currently included.
The link Andy commented with above to a current reworking if the nnet package also does not currently include selforgmap, but this could obviously change. The included function files can be seen inside the inst folder.
if MATLAB's selforgmap is not an option for you, you will either need to code your own implementation or switch bto another programming language. A quick search does reveal a Python implementation of selforgmap that may serve your purpose.

Is it possible to update and use updated .ini and .ned files when Omnet++ simulation is running?

I am trying to run Omnet++ and matlab software in parallel and want them to communicate. When Omnet++ is running, I want to update the position of the node and for that I want to edit the .ned and .int files with matlab results continuously. During simulation I want to generate the result file using the updated files. I want just to update the position and don't want to add or delete any node. Please suggest me a way for proceeding?
matlab_loop
{
matlab_writes_position_in_ned_file;
delay(100ms);
}
omnet_loop
{
omnet_loads_ned_and_simulates;
//sca and vec should update;
delay(100ms);
}
Thank you.
NED and Ini files are read only during initialization of the model. You can't "read" them again after the simulation started. On the other hand, you are free to modify your parameters and create/delete modules using OMNeT++'s C++ API. What you want to achieve is basicaly: set your node position based on some calculations carried out by matlab code. The proper way to do it:
Generate C code from your matlab code.
Link that code to your OMNeT++ model
Create a new mobility model (assuming you are using INET) that is using the matlab code
What you are looking for seems to be more of a project rather than a question/problem which can be solved in Q&A site like stackoverflow.
Unfortunately, I have little understanding of matlab and V-REP to provide you a satisfactory answer. However, it seems that you will need to play around with APIs in lower levels.
As an example of coupling different simulation tools to form a simulation framework in case of need consider reading this paper and this
Also note the answer given by #Rudi. He seems to know what he is talking about.

Open the m file for System Objects in MATLAB

I am trying to use the Communications Toolbox in Matlab. In this toolbox there are a number of built in Systems Objects for example
1) comm.PSKModulator
I want to examine the .m file and see how these system objects are implemented. So I wrote down the command
open comm.PSMModulator
However, that doesnt help. Does anyone know why it doesn't work or maybe one cant access such code?
Update
When I write down which comm.PSKModulator I receive the following
/Applications/MATLAB_R2014a.app/toolbox/comm/comm/+comm/PSKModulator.p % comm.PSKModulator constructor
and where I write open comm.PSKModulator I get
Error using open (line 146)
File associated with
'/Applications/MATLAB_R2014a.app/toolbox/comm/comm/+comm/PSKModulator.p' not found.
Thanks
Some System objects may be implemented in C++ and does not have much to show in MATLAB code which might be the reason this is p-coded. You need to check the corresponding Simulink block documentation for description of the algorithm used. You can find documentation for M-PSK Modulator Baseband at http://www.mathworks.com/help/comm/ref/mpskmodulatorbaseband.html which has more description about the algorithm implemented.

training a new model using pascal kit

need some help on this.
Currently I am doing a project on computer vision that requires me to train a new model to detect a certain object.
In this case, I am using the system provided by P. Felzenszwalb, D. McAllester, D. Ramaman and his team => Discriminatively trained deformable part models which is implemented in Matlab.
Project webpage: http://www.cs.uchicago.edu/~pff/latent/.
However I have no idea how to direct the system to use my dataset(a collection of images and annotation) which is different from the the PASCAL datasets so as to train a new model.
By directing, I meant a line of code that allows me to change the dataset the system reads from, for training a model.
E.g.
% directory for caching models, intermediate data, and results
cachedir = ['/var/tmp/rbg/YOURPATH/' VOCyear '/'];
I tried looking at their Readme and documentation guides but they do not make any mention. Do correct me if I am wrong.
Let me know if I have not made my problem clear enough.
I tried looking at some files such as global.m but no go.
Your help is much appreciated and thanks in advance!
You can try to read pascal.m in the DPM package(voc-release5), there are similar code working on VOC2007/2010 dataset.
There are plenty of parts that need to be adapted to achieve this. For example the voc_config has to be adapted in order to read from your files.
The same with the pascal_train.m function. Depending on the images and the way you parse them, this may require quite some time to adapt this function.
Other functions to consider:
imreadx
pascal_test
pascaleval