Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

centerLossLayer #27

Open
happy-Bobo opened this issue Nov 23, 2018 · 3 comments
Open

centerLossLayer #27

happy-Bobo opened this issue Nov 23, 2018 · 3 comments

Comments

@happy-Bobo
Copy link

happy-Bobo commented Nov 23, 2018

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
Copy link
Owner

mathmanu commented Nov 23, 2018

  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
Copy link
Author

thank you for your reply!

@happy-Bobo
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants