mxnet
|
namespace of arguments More...
Classes | |
struct | EnvArguments |
Environment arguments that is used by the function. These can be things like scalar arguments when add a value with scalar. More... | |
struct | GradFunctionArgument |
super class of all gradient function argument More... | |
struct | Input0 |
First input to the function. More... | |
struct | Input1 |
Second input to the function. More... | |
struct | OutputGrad |
Gradient of output value. More... | |
struct | OutputValue |
Ouput value of the function to the function. More... | |
class | SimpleOpRegEntry |
registry entry to register simple operators via functions. More... | |
class | SimpleOpRegistry |
registry for TBlob functions More... | |
Typedefs | |
typedef void(* | SourceFunction) (const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
source function that generate output based on env The result container is pre-allocated with the correct shape. More... | |
typedef mxnet::TShape(* | SourceShapeFunction) (const EnvArguments &env) |
Shape inference function to get the correct shape. More... | |
typedef void(* | UnaryFunction) (const TBlob &src, const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
Unary function that takes a src and save result to ret. The result container is pre-allocated with the correct shape. More... | |
typedef mxnet::TShape(* | UnaryShapeFunction) (const mxnet::TShape &src, const EnvArguments &env) |
Shape inference function to get the correct shape given source. More... | |
typedef void(* | UnaryGradFunctionT0) (const OutputGrad &out_grad, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes output value of function and computes gradient wrt to input. More... | |
typedef void(* | UnaryGradFunctionT1) (const OutputGrad &out_grad, const OutputValue &out_value, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes output value of function and computes gradient wrt to input. More... | |
typedef void(* | UnaryGradFunctionT2) (const OutputGrad &out_grad, const Input0 &in_data0, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes input value of function and computes gradient wrt to input. More... | |
typedef void(* | BinaryFunction) (const TBlob &lhs, const TBlob &rhs, const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
Binary function that takes lhs, rhs and save result to ret. The result container is pre-allocated with the correct shape. More... | |
typedef mxnet::TShape(* | BinaryShapeFunction) (const mxnet::TShape &lhs, const mxnet::TShape &rhs, const EnvArguments &env) |
Shape inference function to get the correct shape given source shapes. More... | |
typedef void(* | BinaryGradFunctionT0) (const OutputGrad &out_grad, const EnvArguments &env, TBlob *lhs_grad, TBlob *rhs_grad, OpReqType req_lhs_grad, OpReqType req_rhs_grad, RunContext ctx) |
Gradient function that takes only output gradient and computes gradient wrt to input. We support total gradient as a whole to make it easy to combine a few ops. More... | |
typedef void(* | BinaryGradFunctionT1) (const OutputGrad &out_grad, const Input0 &lhs, const Input1 &rhs, const EnvArguments &env, TBlob *lhs_grad, TBlob *rhs_grad, OpReqType req_lhs_grad, OpReqType req_rhs_grad, RunContext ctx) |
Gradient function that takes inputs of function anod computes gradient wrt to input. More... | |
Enumerations | |
enum | SimpleOpInplaceOption { kNoInplace, kInplaceInOut, kInplaceOutIn, kInplaceLhsOut, kInplaceOutLhs } |
options in the registry to set inplace of operator More... | |
enum | SimpleOpScalarOption { kScalarBeforeArray, kArrayBeforeScalar } |
options in the registry to set symbolic registration More... | |
enum | SimpleOpRegOption { kNotRegisterSymbolic, kRegisterSymbolic } |
options in the registry to set symbolic registration More... | |
namespace of arguments
typedef void(* mxnet::op::BinaryFunction) (const TBlob &lhs, const TBlob &rhs, const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
Binary function that takes lhs, rhs and save result to ret. The result container is pre-allocated with the correct shape.
lhs | The left operand |
rhs | The right operand |
env | The Environment arguments. |
ret | The containter to store return value. |
req | The requirement to stroe the ret. |
ctx | Runtime context to execute the function. |
typedef void(* mxnet::op::BinaryGradFunctionT0) (const OutputGrad &out_grad, const EnvArguments &env, TBlob *lhs_grad, TBlob *rhs_grad, OpReqType req_lhs_grad, OpReqType req_rhs_grad, RunContext ctx) |
Gradient function that takes only output gradient and computes gradient wrt to input. We support total gradient as a whole to make it easy to combine a few ops.
out_grad | the gradient wrt to output of the function. |
env | The Environment arguments. |
lhs_grad | The container to store result of lhs gradient. |
rhs_grad | The container to store result of lhs gradient. |
req_lhs_grad | The requirement to store the lhs_grad |
req_rhs_grad | The requirement to store the rhs_grad |
ctx | Runtime context to execute the function. |
typedef void(* mxnet::op::BinaryGradFunctionT1) (const OutputGrad &out_grad, const Input0 &lhs, const Input1 &rhs, const EnvArguments &env, TBlob *lhs_grad, TBlob *rhs_grad, OpReqType req_lhs_grad, OpReqType req_rhs_grad, RunContext ctx) |
Gradient function that takes inputs of function anod computes gradient wrt to input.
out_grad | the gradient wrt to output of the function. |
lhs | The left operand to the function. |
rhs | The right operand to the function. |
env | The Environment arguments. |
lhs_grad | The container to store result of lhs gradient. |
rhs_grad | The container to store result of lhs gradient. |
req_lhs_grad | The requirement to store the lhs_grad |
req_rhs_grad | The requirement to store the rhs_grad |
ctx | Runtime context to execute the function. |
typedef mxnet::TShape(* mxnet::op::BinaryShapeFunction) (const mxnet::TShape &lhs, const mxnet::TShape &rhs, const EnvArguments &env) |
Shape inference function to get the correct shape given source shapes.
lhs | The shape of left operand. |
rhs | The shape of right operand. |
env | The Environment arguments. |
typedef void(* mxnet::op::SourceFunction) (const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
source function that generate output based on env The result container is pre-allocated with the correct shape.
env | The Environment arguments. |
ret | The containter to store return value. |
req | The requirement to stroe the ret. |
ctx | Runtime context to execute the function. |
typedef mxnet::TShape(* mxnet::op::SourceShapeFunction) (const EnvArguments &env) |
Shape inference function to get the correct shape.
env | The Environment arguments. |
typedef void(* mxnet::op::UnaryFunction) (const TBlob &src, const EnvArguments &env, TBlob *ret, OpReqType req, RunContext ctx) |
Unary function that takes a src and save result to ret. The result container is pre-allocated with the correct shape.
src | The source data. |
env | The Environment arguments. |
ret | The containter to store return value. |
req | The requirement to stroe the ret. |
ctx | Runtime context to execute the function. |
typedef void(* mxnet::op::UnaryGradFunctionT0) (const OutputGrad &out_grad, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes output value of function and computes gradient wrt to input.
out_grad | the gradient wrt to output of the function. |
env | The Environment arguments. |
in_grad | The container to store result input gradient. |
req | The requirement to store the ret value. |
ctx | Runtime context to execute the function. |
typedef void(* mxnet::op::UnaryGradFunctionT1) (const OutputGrad &out_grad, const OutputValue &out_value, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes output value of function and computes gradient wrt to input.
out_grad | the gradient wrt to output of the function. |
out_value | the value of the function. |
env | The Environment arguments. |
in_grad | The container to store result input gradient. |
req | The requirement to store the ret value. |
ctx | Runtime context to execute the function. |
typedef void(* mxnet::op::UnaryGradFunctionT2) (const OutputGrad &out_grad, const Input0 &in_data0, const EnvArguments &env, TBlob *in_grad, OpReqType req, RunContext ctx) |
Gradient function that takes input value of function and computes gradient wrt to input.
out_grad | the gradient wrt to output of the function. |
in_data0 | the input value of the function. |
env | The Environment arguments. |
in_grad | The container to store result input gradient. |
req | The requirement to store the ret value. |
ctx | Runtime context to execute the function. |
typedef mxnet::TShape(* mxnet::op::UnaryShapeFunction) (const mxnet::TShape &src, const EnvArguments &env) |
Shape inference function to get the correct shape given source.
src | The source shape |
env | The Environment arguments. |
options in the registry to set inplace of operator