1 #include "caffe2/operators/reverse_packed_segs_op.h" 4 REGISTER_CPU_OPERATOR(ReversePackedSegs, ReversePackedSegsOp<CPUContext>);
6 OPERATOR_SCHEMA(ReversePackedSegs)
10 Reverse segments in a 3-D tensor (lengths, segments, embeddings,), leaving 11 paddings unchanged. This operator is used to reverse input of a recurrent neural 12 network to make it a BRNN. 14 .Input(0, "data",
"a 3-D (lengths, segments, embeddings,) tensor.")
15 .Input(1,
"lengths",
"length of each segment.")
19 "a (lengths, segments, embeddings,) tensor with each segment reversed" 20 "and paddings unchanged.");
23 using GradientMakerBase::GradientMakerBase;
24 vector<OperatorDef> GetGradientDefs()
override {
28 vector<string>{GO(0), I(1)},
29 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 ...