Caffe2 - C++ API
A deep learning, cross platform ML framework
int8_leaky_relu_op.cc
1 #include "caffe2/operators/quantized/int8_leaky_relu_op.h"
2 
3 namespace caffe2 {
4 
5 REGISTER_CPU_OPERATOR(Int8LeakyRelu, int8::Int8LeakyReluOp);
6 
7 OPERATOR_SCHEMA(Int8LeakyRelu)
8  .NumInputs(1)
9  .NumOutputs(1)
10  .Arg("alpha", "Coefficient of leakage, default value is 0.01")
11  .Arg("Y_scale", "Output tensor quantization scale")
12  .Arg("Y_zero_point", "Output tensor quantization offset")
13  .AllowInplace({{0, 0}})
14  .CostInferenceFunction(PointwiseCostInference<2>)
15  .IdenticalTypeAndShape()
16  .SetDoc(R"DOC(
17 LeakyRelu takes input data (Tensor<T>) and an argument alpha, and produces one
18 output data (Tensor<T>) where the function `f(x) = alpha * x for x < 0`,
19 `f(x) = x for x >= 0`, is applied to the data tensor elementwise.
20 )DOC")
21  .Input(0, "X", "1D input tensor")
22  .Output(0, "Y", "1D input tensor");
23 
24 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13