I am confused about changing the parameters for training a net in caffe based on our own data.

  • Which layers of net we should pay attention more to train the net on our own data? For example, the number of outputs based on the number of classes.

I tried to train FCN32 for semantic segmentation. I changed the number of outputs in Deconvolution layer (i.e.,upscore_sign) to the number of classes in my data, but it is giving an error.

  • We have different outputs in different convolutional layers. How can I detect different outputs from each other and which one should I change?
  • The next question is what is the difference between deploy.prototxt and train_val.prototxt.
  • And what is the application of deploy.prototxt? Should I change the layers in deploy.prototxt based on the train_val.prototxt?

I really appreciate if someone knows, please share your knowledge.

Thanks

1

There are 1 answers

1
Shai On BEST ANSWER

Which layer of the net we should pay attention

When finetuning a model to a new task, with probably different number of labels, one must change num_output of the last layer.
The last layer serves as a probability prediction layer, outputting a vector of probabilities for each predicted variable: For image classification, the net predicts a prob vector per image; In FCN the net outputs prob vector pre pixel. The prob vector is of length = number of labels = num_output of last layer. Thus you must change this value to accommodate for the new number of labels in your new task.
See this post for more details.

What is the difference between 'deploy.prototxt' and 'train_val.prototxt'

This difference is explained in this post.

Should I change the layers in 'deploy.prototxt' based on the 'train_val.prototxt'?

Yes!