Caffe2 - C++ API
A deep learning, cross platform ML framework
adjust_batch_op.cc
1 #include "caffe2/operators/adjust_batch_op.h"
2 
3 namespace caffe2 {
4 REGISTER_CPU_OPERATOR(AdjustBatch, AdjustBatchOp<CPUContext>);
5 OPERATOR_SCHEMA(AdjustBatch)
6  .NumInputs(1, 2)
7  .NumOutputs(1, 2)
8  .Input(0, "Input", "Input data")
9  .Input(1, "RealBatchSizeIn", "[Optional] Real batch size")
10  .Output(0, "Output", "Data with Adjusted batch size")
11  .Output(1, "RealBatchSizeOut", "[Optional] Real batah size")
12  .Arg("max_batch_size", "(*int*): max batch size")
13  .SetDoc(R"DOC(
14 Adjust the batch size of `input` tensor. When we only have 1 input, it will adjust the batch size according to `max_batch_size` argument. In this case, in addition, if it has two outputs, it will record the input batch size and record it to the second output. When we have 2 inputs, it expects the seocnd input contains the batch size to adjust to, and will truncate the input data accordingly.
15 
16 Github Links:
17 - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/adjust_batch_op.cc
18 
19  )DOC");
20 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13