gradientChecker, how to exclude blob? (c++)

8 views
Skip to first unread message

suk

unread,
Nov 22, 2016, 12:57:34 PM11/22/16
to Caffe Users
Hi all,


I would like to use the gradient checker like this, where layer is an instance of a custom layer:

GradientChecker<Dtype> checker(1, 1e-2);
checker.CheckGradient(&layer, this->blob_bottom_vec_, this->blob_top_vec_);

Now, for one of the two bottom blobs of the layer, backprop isn't implemented (because it's not needed).
Is it possible to stop CheckGradient from checking the gradient for this blob, maybe by switching off propagateBack, or similar, somewhere?

You can also just look at all the failure output and see from which blob it originates, and if it's always the 'bad' blob, all is fine.
Is there a faster way?


Would be cool if someone knows something :)

Reply all
Reply to author
Forward
0 new messages