A helper class to indicate that the operator does not need gradient computation. More...
#include <operator_gradient.h>
Additional Inherited Members | |
Public Member Functions inherited from caffe2::GradientMakerBase | |
GradientMakerBase (const OperatorDef &def, const vector< GradientWrapper > &g_output) | |
virtual bool | CopyDeviceOption () const |
virtual bool | CopyEngine () const |
virtual bool | CopyArguments () const |
virtual GradientOpsMeta | Get () |
Returns the gradient ops meta. More... | |
const OperatorDef & | Def () const |
Static Public Member Functions inherited from caffe2::GradientMakerBase | |
static CaffeMap< string, string > | MatchGradsToParams (const OperatorDef &op) |
Returns map that returns the parameters that the gradients are for. | |
Protected Member Functions inherited from caffe2::GradientMakerBase | |
string | I (const int i) |
string | O (const int i) |
string | GI (const int i) |
string | GI_I (const int i) |
string | GI_V (const int i) |
string | GO (const int i) |
string | GO_I (const int i) |
string | GO_V (const int i) |
const GradientWrapper & | GradOut (int i) |
void | SetDense (const int i, const string &name) |
void | SetSparse (const int i, const string &indices, const string &values) |
Static Protected Member Functions inherited from caffe2::GradientMakerBase | |
template<class... Args> | |
static vector< OperatorDef > | SingleGradientDef (const Args &... args) |
a helper function to allow one to create one single operator def, which is usually the case for many simple operators. | |
Protected Attributes inherited from caffe2::GradientMakerBase | |
const OperatorDef & | def_ |
const vector< GradientWrapper > & | g_output_ |
vector< GradientWrapper > | g_input_ |
A helper class to indicate that the operator does not need gradient computation.
Use the macro NO_GRADIENT to register operators that do not have gradients. Note that this is different fron SHOULD_NOT_DO_GRADIENT: the latter means that the gradient computation should not flow through it at all, and throws an error if it is called.
Definition at line 244 of file operator_gradient.h.