Caffe2 - C++ API
A deep learning, cross platform ML framework
1 #include "caffe2/operators/accumulate_op.h"
3 namespace caffe2 {
4 REGISTER_CPU_OPERATOR(Accumulate, AccumulateOp<float, CPUContext>);
7  .NumInputs(1)
8  .NumOutputs(1)
9  .IdenticalTypeAndShape()
10  .SetDoc(R"DOC(
11 Accumulate operator accumulates the input tensor to the output tensor. If the
12 output tensor already has the right size, we add to it; otherwise, we first
13 initialize the output tensor to all zeros, and then do accumulation. Any
14 further calls to the operator, given that no one else fiddles with the output
15 in the interim, will do simple accumulations.
16 Accumulation is done using Axpby operation as shown:
17  Y = 1*X + gamma*Y
18 where X is the input tensor, Y is the output tensor and gamma is the multiplier
19 argument.
20 )DOC")
21  .Arg("gamma", "(float, default 1.0) Accumulation multiplier")
22  .Input(0, "input", "The input tensor that has to be accumulated to the "
23  "output tensor. If the output size is not the same as input size, the "
24  "output tensor is first reshaped and initialized to zero, and only "
25  "then, accumulation is done.")
26  .Output(0, "output", "Accumulated output tensor");
29 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13