1 #include "caffe2/operators/adjust_batch_op.h" 4 REGISTER_CPU_OPERATOR(AdjustBatch, AdjustBatchOp<CPUContext>);
5 OPERATOR_SCHEMA(AdjustBatch)
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")
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. 17 - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/adjust_batch_op.cc A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...