13 std::vector<string>{
GO(0),
I(0)},
14 std::vector<string>{
GI(0)});
23 "Im2Col",
"", std::vector<string>{
GO(0)}, std::vector<string>{
GI(0)});
31 .SetDoc(
"The Im2Col operator from Matlab.")
32 .TensorInferenceFunction(
51 const TensorShape&
X =
in[0];
52 int N = 0,
C = 0,
H = 0,
W = 0;
95 .
Input(0,
"X",
"4-tensor in NCHW or NHWC.")
99 "4-tensor. For NCHW: N x (C x kH x kW) x outH x outW."
100 "For NHWC: N x outH x outW x (kH x kW x C");
A helper class to index into arguments.
static T GetSingleArgument(const Def &def, const string &name, const T &default_value)
vector< OperatorDef > GetGradientDefs() override
vector< OperatorDef > GetGradientDefs() override
GradientMakerBase(const OperatorDef &def, const vector< GradientWrapper > &g_output)
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 ...
TORCH_API void Col2Im(const int channels, const int height, const int width, const int patch_h, const int patch_w, const int dilation_h, const int dilation_w, const int pad_t, const int pad_l, const int pad_b, const int pad_r, const int stride_h, const int stride_w, const T *col_data, T *img_data, Context *context, const int groups=1)
TORCH_API void Im2Col(const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int dilation_h, const int dilation_w, const int pad_t, const int pad_l, const int pad_b, const int pad_r, const int stride_h, const int stride_w, const T *img_data, T *col_data, Context *context, const int groups=1)
Copyright (c) 2016-present, Facebook, Inc.
REGISTER_CPU_OPERATOR(ATen, ATenOp< CPUContext >)
parameter efficient embedding termed TT which can be plugged in into any model and trained end to end The benefits of our compressed TT layer are twofold instead of storing huge embedding it stores a sequence of much smaller dimensional and dimensional necessary for reconstructing the required which allows compressing the model significantly at the cost of a negligible performance drop the overall number of parameters can be relatively which allows to use larger batches or train efficiently in a case of limited resources DOC vector< int >
return vector< TensorShape >
ArgumentHelper helper(def)
SparseLengths8BitsRowwiseOp< CPUContext, 0, 1 >::LENGTHS uint8 tensor obtained with Vector with the same sum of elements as the first dimension of DATA Input(3, "scale_bias", "Matrix of floats, each row r_i of which stores a pair " "s_i, b_i -- scale and bias for i-th row") .Output(0
const vector< TensorShape > & in
TensorShape CreateTensorShape(vector< T_I > dims, ::caffe2::TensorProto_DataType dt)
StorageOrder StringToStorageOrder(const string &str)
Output tensor quantization scale X
REGISTER_GRADIENT(CTC, GetCTCGradient)
CAFFE_ENFORCE(dims.front() >=0, "Dimension ids must be non-negative.")
INT_MAX Subnet with blob bindings Indices of corresponding outer workspace in order