Reputation: 699
I have a pretrained caffe model with no loss layers. I want to do the following steps:
I can not figure out how to add a loss layer to a pretrained model to do this. In other NN frameworks you can call a backward() function and pass a cost function. Is there any way to do this in caffe?
Upvotes: 1
Views: 399
Reputation: 5645
You can create a custom layer in caffe for your cost function. Make a call to this cost function in the .prototxt file. You can finetune a pretrained model using your new cost function.
Finetuning is done using the below format of coomandline code:
./build/tools/caffe train --solver theAboveMentioned.prototxt --weights thePreTrainedWeightsFile
More on caffe finetuning can be found here.
Upvotes: -1