mxnet
Public Member Functions | List of all members
mxnet::cpp::Operator Class Reference

Operator interface. More...

#include <operator.h>

Collaboration diagram for mxnet::cpp::Operator:
Collaboration graph

Public Member Functions

 Operator (const std::string &operator_name)
 Operator constructor. More...
 
Operatoroperator= (const Operator &rhs)
 
template<typename T >
OperatorSetParam (const std::string &name, const T &value)
 set config parameters More...
 
template<typename T >
OperatorSetParam (int pos, const T &value)
 set config parameters from positional inputs More...
 
OperatorSetInput (const std::string &name, Symbol symbol)
 add an input symbol More...
 
template<int N = 0>
void PushInput (const Symbol &symbol)
 add an input symbol More...
 
Operatoroperator() ()
 add input symbols More...
 
Operatoroperator() (const Symbol &symbol)
 add input symbols More...
 
Operatoroperator() (const std::vector< Symbol > &symbols)
 add a list of input symbols More...
 
Symbol CreateSymbol (const std::string &name="")
 create a Symbol from the current operator More...
 
OperatorSetInput (const std::string &name, NDArray ndarray)
 add an input ndarray More...
 
template<int N = 0>
OperatorPushInput (const NDArray &ndarray)
 add an input ndarray More...
 
template<class T , class... Args, int N = 0>
OperatorPushInput (const T &t, Args...args)
 add positional inputs More...
 
template<class T , int N = 0>
OperatorPushInput (const T &t)
 add the last positional input More...
 
Operatoroperator() (const NDArray &ndarray)
 add input ndarrays More...
 
Operatoroperator() (const std::vector< NDArray > &ndarrays)
 add a list of input ndarrays More...
 
template<typename... Args>
Operatoroperator() (Args...args)
 add input ndarrays More...
 
std::vector< NDArrayInvoke ()
 
void Invoke (NDArray &output)
 
void Invoke (std::vector< NDArray > &outputs)
 

Detailed Description

Operator interface.

Constructor & Destructor Documentation

mxnet::cpp::Operator::Operator ( const std::string &  operator_name)
explicit

Operator constructor.

Parameters
operator_nametype of the operator

Member Function Documentation

Symbol mxnet::cpp::Operator::CreateSymbol ( const std::string &  name = "")

create a Symbol from the current operator

Parameters
namethe name of the operator
Returns
the operator Symbol
std::vector<NDArray> mxnet::cpp::Operator::Invoke ( )
void mxnet::cpp::Operator::Invoke ( NDArray output)
void mxnet::cpp::Operator::Invoke ( std::vector< NDArray > &  outputs)
Operator& mxnet::cpp::Operator::operator() ( )
inline

add input symbols

Returns
reference of self
Operator& mxnet::cpp::Operator::operator() ( const Symbol symbol)
inline

add input symbols

Parameters
symbolthe input symbol
Returns
reference of self
Operator& mxnet::cpp::Operator::operator() ( const std::vector< Symbol > &  symbols)
inline

add a list of input symbols

Parameters
symbolsthe vector of the input symbols
Returns
reference of self
Operator& mxnet::cpp::Operator::operator() ( const NDArray ndarray)
inline

add input ndarrays

Parameters
ndarraythe input ndarray
Returns
reference of self
Operator& mxnet::cpp::Operator::operator() ( const std::vector< NDArray > &  ndarrays)
inline

add a list of input ndarrays

Parameters
ndarraysthe vector of the input ndarrays
Returns
reference of self
template<typename... Args>
Operator& mxnet::cpp::Operator::operator() ( Args...  args)
inline

add input ndarrays

Returns
reference of self
Operator& mxnet::cpp::Operator::operator= ( const Operator rhs)
template<int N = 0>
void mxnet::cpp::Operator::PushInput ( const Symbol symbol)
inline

add an input symbol

Parameters
symbolthe input symbol
template<int N = 0>
Operator& mxnet::cpp::Operator::PushInput ( const NDArray ndarray)
inline

add an input ndarray

Parameters
ndarraythe input ndarray
template<class T , class... Args, int N = 0>
Operator& mxnet::cpp::Operator::PushInput ( const T &  t,
Args...  args 
)
inline

add positional inputs

template<class T , int N = 0>
Operator& mxnet::cpp::Operator::PushInput ( const T &  t)
inline

add the last positional input

Operator& mxnet::cpp::Operator::SetInput ( const std::string &  name,
Symbol  symbol 
)

add an input symbol

Parameters
namename of the input symbol
symbolthe input symbol
Returns
reference of self
Operator& mxnet::cpp::Operator::SetInput ( const std::string &  name,
NDArray  ndarray 
)

add an input ndarray

Parameters
namename of the input ndarray
ndarraythe input ndarray
Returns
reference of self
template<typename T >
Operator& mxnet::cpp::Operator::SetParam ( const std::string &  name,
const T &  value 
)
inline

set config parameters

Parameters
namename of the config parameter
valuevalue of the config parameter
Returns
reference of self
template<typename T >
Operator& mxnet::cpp::Operator::SetParam ( int  pos,
const T &  value 
)
inline

set config parameters from positional inputs

Parameters
posthe position of parameter
valuevalue of the config parameter
Returns
reference of self

The documentation for this class was generated from the following file: