mxnet
Public Member Functions | Public Attributes | List of all members
mxnet::OpContext Struct Reference

All the possible information needed by Operator.Forward and Backward This is the superset of RunContext. We use this data structure to bookkeep everything needed by Forward and Backward. More...

#include <op_attr_types.h>

Collaboration diagram for mxnet::OpContext:
Collaboration graph

Public Member Functions

template<typename xpu >
mshadow::Stream< xpu > * get_stream () const
 get mshadow stream from Context More...
 

Public Attributes

bool need_grad
 whether there is a backward phase to compute gradients. More...
 
bool is_train
 whether it is training phase More...
 
RunContext run_ctx
 RunContext related resources. More...
 
engine::CallbackOnComplete async_on_complete
 the callback when operation completes, used by asynchronize ops More...
 
std::vector< Resourcerequested
 Resources requested by the operator. More...
 

Detailed Description

All the possible information needed by Operator.Forward and Backward This is the superset of RunContext. We use this data structure to bookkeep everything needed by Forward and Backward.

See also
Resource

Member Function Documentation

template<typename xpu >
mshadow::Stream<xpu>* mxnet::OpContext::get_stream ( ) const
inline

get mshadow stream from Context

Returns
the mshadow stream
Template Parameters
xputhe device type of the stream

Member Data Documentation

engine::CallbackOnComplete mxnet::OpContext::async_on_complete

the callback when operation completes, used by asynchronize ops

bool mxnet::OpContext::is_train

whether it is training phase

bool mxnet::OpContext::need_grad

whether there is a backward phase to compute gradients.

std::vector<Resource> mxnet::OpContext::requested

Resources requested by the operator.

RunContext mxnet::OpContext::run_ctx

RunContext related resources.


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