caffe2_cpp_tutorial icon indicating copy to clipboard operation
caffe2_cpp_tutorial copied to clipboard

how to decide whether an operator is trainable

Open breadbread1984 opened this issue 7 years ago • 1 comments

I am confusing about whether I shall put an operator into trainable_ops or non_trainable_ops. How do you decide it? I saw Scale operator was put in non_trainable_ops. Shall I put Pow in non_trainable_ops as well?

breadbread1984 avatar Dec 02 '17 12:12 breadbread1984

That's a good question. This trainable/non_trainable thing is a bit of a hack. It's mainly used to decide for which operators we need a to add a gradient in AddGradientOps. In general the rule is: if it's an operator that is a core part of the model output, then it's probably in trainable. I don't recall why Scale is not in trainable. Pow should be in trainable.

leovandriel avatar Dec 04 '17 17:12 leovandriel