Caffe calculate issue - neural-network

I have a question. I have a dataset that contains 5-10 photos (only for test run).
Using the example of a model bvlc_reference_caffenet I ran caffe.
But caffe process works about ~ 1 day. Please tell me if this is normal?

Related

Is it necessary to initialized the weights for every time retraining the same model in matlab with nntool?

I know for the ANN model, the initial weights are random. If I train a model and repeat training 10 times by nntool, do the weights initialize every time when I click the training button, or still use the same initial weights you just adjusted?
I am not sure if the nntool you refer to uses the train method (see here https://de.mathworks.com/help/nnet/ref/train.html).
I have used this method quite extensively and it works in a similar way as tensorflow, you store a number of checkpoints and load the latest status to continue training from such point. The code would look something like this.
[feat,target] = iris_dataset;
my_nn = patternnet(20);
my_nn = train(my_nn,feat,target,'CheckpointFile','MyCheckpoint','CheckpointDelay',30);
Here we have requested that checkpoints are stored at a rate not greater than one each 30 seconds. When you want to continue training the net must be loaded from the checkpoint file as:
[feat,target] = iris_dataset;
load MyCheckpoint
my_nn = checkpoint.my_nn;
my_nn = train(my_nn,feat,target,'CheckpointFile','MyCheckpoint');
This solution involves training the network from the command line or via a script rather than using the GUI supplied by Mathworks. I honestly think this latter method is great for beginners but if you want to do any interesting clever start using the command line or even better switch to libraries like Torch or Tensorflow!
Hope it helps!

Caffe: How to train end-to-end (image to image)?

We are quite new to caffe, but what we have seen so far, looks really promising.
After reading a few papers (1,2), we wanted to reproduce the result of 1, specifically about a segmentation challenge 4.
We downloaded the modified caffe from 3 and were able to execute it, just to see, that the trained network didn't work with the dataset from 4.
At first we thought that the network needs to be trained for the specific problem.
Which lead to the problem of how to do 'image-to-image (aka end-to-end) learning ' (4, training data).
This lead us to 'holistically nested edge detection' (hed, 2), where image-to-image learning, seems to be used.
With hed, we were able to retrain the network on our own. But it doesn't work (it leads to all 0 or 0.5 images - black images :-( ) if we try to train the network for the dataset of 4. For initialization we wrote a script to calculate the mean-map witch we use for the dataset of 4.
Our question(s) are:
How can we reproduce the result, mentioned in 1 by running
image-to-image training?
or
How do you train networks, where we have image-to-image learning?
Since we only have 30 image-to-image pairs, should we implement
deformation as mentioned in 1/3 via matlab/python or is there a
functionality within caffe already?
Are we missing something simple from 1 or 2?
Kind regards,
Klaus and Bernhard
Ps: We asked the same question at the caffe-user group and intend to post solutions at both locations.
After some time, and trying several different things out - i stumbled upon:
https://github.com/naibaf7
Using that caffe fork, with caffe_neural_models and caffe_neural_tool training image(raw)-to-image(labels) can be done quite simple.
Just check out 'caffe_neural_models/net*' for different configurations.

Multiple Simulation Runs (OMnet++)

I implemented a 100 km long highway scenario using Veins Framework for OMNET++.
In order to get more reliable results, how many simulation runs are required for each set of experiment ?
How can we define and control the number of simulation runs?
Quicker simulations:
You can make your simulations run faster in 3 possible ways:
run sumo without the gui by starting the ./sumo-launchd.py excluding sumo-gui in the end and writing only sumo.
run simulations using Cmdenv and not Tkenv,
compile your Veins project code in in release mode. You can achieve that by doing:
-make MODE=release -j <number-of-cores>
These steps will improve simulation run-time up to 50%.
In the Veins FAQ you have the following questions:
I've launched a simulation in the OMNeT++ TkEnv; why is it running so
awefully slow?
I've launched a simulation in the OMNeT++ Cmdenv; can I speed it up
further?
There are some suggestions given in the FAQ which might help you run simulations quicker.
Number of simulation runs:
As far as the number of simulation runs is concerned, it is hard to tell. You can use confidence intervals for your results to see how fine-grained they are; In any case I would suggest starting with 5 repetitions.
Automatic control of simulation runs:
This can be accomplished using repeat parameter in the .ini file as it is explained here.
On how to do that from the OMNeT++ IDE follow this answer (note the comments as well).
To run parallel simulations through the command line, follow this answer.
a) This is an open ended question as you have not defined what 'more reliable' means. To get a more reliable result, you need more runs. That's all that can be said.
b) use repeat = 2 in the ini file to get two repetitions
I'm also suggesting reading the manual's corresponding chapter:
https://omnetpp.org/doc/omnetpp/manual/usman.html#sec341
(Chapter 10 is also related to your question)

Weka classifier MultilayerPerceptron

I have a problem with weka =/.
I'm using weka for data mining time series with neural network, in other words: the classifier MultilayerPerceptron.
my configuration is "MultilayerPerceptron -L 0.3 -M 0.1 -N 1000 -V 0 -S 0 -E 20 -H a"
There is the problem... the weka never ends.
I have 1904 instances and 18 attributes, corresponding to five days of time series, is not much data =/.
the last time the weka run for 8 days and it stop to run but don't give me a result.
any idea ?
I have run a MultilayerPerceptron using 10-fold Cross-Validation using a generated dataset containing 1904 instances and 18 attributes.
Given the configuration outlined above, each fold took 12 seconds on my PC and completed quite fine. Given the size of the dataset and the number of training runs, it shouldn't really take too long to train the MLP.
Perhaps there is something up with the data that you are using (Perhaps you could supply the arff header and some sample lines) or the system stopped training for some reason. You could try on another computer, but I'm not sure if that would resolve the issue.
I can't see why it would take 8 days to train a network like this. You probably don't need to wait that long before realising that there is an issue in the training. :)
Hope this Helps!

Prediction/delay forcasting using Machine Learning?

I have a set of data for the past 5 years. Approx 7000 rows of data with features that are binary {yes/no} or are multi-classed {product A, B, C} A total of about 20+ features.
I am trying to make a program (or one time analysis project) to determine (predict) the product shipdate(shipping delay days) based on this historical data. I have 2 columns that indicate when a product was planned to be shipped and another column of when it was actually shipped! Currently.
I'm wondering how I can make a prediction program that determines based on the historic data when new data input of a product will expect to ship. I don't care about a getting a specific date but even just a program that can tell me number of delay days to add...
I took an ML class a while back and I wasn't sure how to start something like this. Any advice? Plus the closest thing to this I can think of is an image recognition assignment using NN. but that was too easy here I have to deal with a date instead of pixel white/black.... I used Matlab back in the day (I still know how to use it) but I just downloaded Weka data mining tool.
I was thinking of a neural network but I'm not sure how to set it up to have my program give me a the expected delay time (# of days/month) from the inputed ship date.
Basically,
I want to input (size = 5, prod = A, ....,expected ship date = jan 1st)
and the program returns the number of days to add as a delay onto my expected ship date given the historical trends...
Would appreciate any any help on how start something like this the correct/easiest/best way... Thanks in advance.
If you use weka, then get your input/label data into the arff format and then you try out all the different regressors (this is a regression problem after all). To avoid having to do too much programming quite yet (if you are just in an exploratory phase), use the weka experimenter which has a GUI for trying out a whole bunch of regressors on your dataset.
Then when you find one that does something expected and you want to do some more data analysis using MATLAB, then you can use a weka/matlab interface.