mathmanu / caffe-jacinto

This repository has moved. The new link can be obtained from https://github.com/TexasInstruments/jacinto-ai-devkit
116 stars 35 forks source link

centerLossLayer #27

Open happy-Bobo opened 5 years ago

happy-Bobo commented 5 years ago

add_centerLoss_error.txt caffe.proto.txt center_loss_layer.cpp.txt center_loss_layer.cu.txt center_loss_layer.hpp.txt

Hello, I want to train my model with caffe-jacinto-0.17 , but my net contain centerLoss layer, so I failed. I am try to add the 'center_Loss_layer.cpp/hpp/cu' to the src/include, but build the framework error, would you help me solve this question, thank you very much!

Otherwise, I don't understand how to set the parameters about sparse in solver.protext, are there any guidance documents?Besides, most of model was trained with three steps, first is initial, second is regularization, third is sparse, I want to know that does regularization_type:"L1" is necessary for sparse? If I want to inference my model on my AM5728 platform with TIDL, do I have to add 'quantize:true' in my deploy.protext, thanks!

mathmanu commented 5 years ago
  1. Center loss The definition of your Center Loss layer is in the style of https://github.com/BVLC/caffe However, this repository is based on https://github.com/NVIDIA/caffe Please look at the definition of layers in this repository and use Ftype, Btype instead of Dtype

  2. Parameters related to sparsity: I have put some commements in caffe.proto (search for sparsity_ ) https://github.com/tidsp/caffe-jacinto/blob/caffe-0.17/src/caffe/proto/caffe.proto However, I agree that it is not much. Kindly look at the example scripts as well.

  3. L1 regularization: Using L1 regularization make inducing sparaity easier. There may be other techniques that does not use L1 regularization - but the method that we have chosen requires it to be able to induce high amount of sparsity with minimal accuracy loss.

happy-Bobo commented 5 years ago

thank you for your reply!

happy-Bobo commented 5 years ago

Hello manu, Thank you for your guidance, I have try my best to modify the file "center_loss_layer.cpp", but there are still a few mistakes when I build the caffe-jacinto, I don't know how to fix the error, please help me, thanks! center_loss_layer.cpp.txt make.log