1 #include "caffe2/operators/scale_op.h" 5 REGISTER_CPU_OPERATOR(Scale, ScaleOp<CPUContext>);
9 .AllowInplace({{0, 0}})
10 .IdenticalTypeAndShape()
12 Scale takes one input data (Tensor) and produces one output data 13 (Tensor) whose value is the input data tensor scaled element-wise. 15 .Arg("scale",
"(float, default 1.0) the scale to apply.");
18 using GradientMakerBase::GradientMakerBase;
19 vector<OperatorDef> GetGradientDefs()
override {
22 "Scale",
"", vector<string>{GO(0)}, vector<string>{GI(0)});
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
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 ...