Executor interface.
More...
#include <executor.h>
|
| Executor (const Symbol &symbol, Context context, const std::vector< NDArray > &arg_arrays, const std::vector< NDArray > &grad_arrays, const std::vector< OpReqType > &grad_reqs, const std::vector< NDArray > &aux_arrays, const std::map< std::string, Context > &group_to_ctx=std::map< std::string, Context >(), Executor *shared_exec=nullptr) |
|
| Executor (const ExecutorHandle &h) |
|
void | Forward (bool is_train) |
| Perform a Forward operation of Operator After this operation, user can get the result by using function head. More...
|
|
void | Backward (const std::vector< NDArray > &head_grads=std::vector< NDArray >()) |
| Perform a Backward operation of the Operator. This must be called after Forward. After this operation, NDArrays specified by grad_in_args_store will be updated accordingly. User is allowed to pass in an empty Array if the head node is loss function and head gradeitn is not needed. More...
|
|
void | Reshape () |
|
std::string | DebugStr () |
| update the arguments with given learning rate and optimizer More...
|
|
| ~Executor () |
| destructor, free the handle More...
|
|
std::map< std::string, NDArray > | arg_dict () |
|
std::map< std::string, NDArray > | grad_dict () |
|
std::map< std::string, NDArray > | aux_dict () |
|
mxnet::cpp::Executor::Executor |
( |
const Symbol & |
symbol, |
|
|
Context |
context, |
|
|
const std::vector< NDArray > & |
arg_arrays, |
|
|
const std::vector< NDArray > & |
grad_arrays, |
|
|
const std::vector< OpReqType > & |
grad_reqs, |
|
|
const std::vector< NDArray > & |
aux_arrays, |
|
|
const std::map< std::string, Context > & |
group_to_ctx = std::map< std::string, Context >() , |
|
|
Executor * |
shared_exec = nullptr |
|
) |
| |
mxnet::cpp::Executor::~Executor |
( |
| ) |
|
|
inline |
destructor, free the handle
std::map<std::string, NDArray> mxnet::cpp::Executor::arg_dict |
( |
| ) |
|
|
inline |
std::map<std::string, NDArray> mxnet::cpp::Executor::aux_dict |
( |
| ) |
|
|
inline |
void mxnet::cpp::Executor::Backward |
( |
const std::vector< NDArray > & |
head_grads = std::vector<NDArray>() | ) |
|
|
inline |
Perform a Backward operation of the Operator. This must be called after Forward. After this operation, NDArrays specified by grad_in_args_store will be updated accordingly. User is allowed to pass in an empty Array if the head node is loss function and head gradeitn is not needed.
- Parameters
-
head_grads | the gradient of head nodes to be backproped. |
std::string mxnet::cpp::Executor::DebugStr |
( |
| ) |
|
update the arguments with given learning rate and optimizer
- Returns
- the SymbolHandle
void mxnet::cpp::Executor::Forward |
( |
bool |
is_train | ) |
|
|
inline |
Perform a Forward operation of Operator After this operation, user can get the result by using function head.
std::map<std::string, NDArray> mxnet::cpp::Executor::grad_dict |
( |
| ) |
|
|
inline |
void mxnet::cpp::Executor::Reshape |
( |
| ) |
|
std::vector<NDArray> mxnet::cpp::Executor::arg_arrays |
std::vector<NDArray> mxnet::cpp::Executor::aux_arrays |
std::vector<NDArray> mxnet::cpp::Executor::grad_arrays |
std::vector<NDArray> mxnet::cpp::Executor::outputs |
arrays store the outputs of forward
The documentation for this class was generated from the following file: