Table Of Contents
Table Of Contents

Executor

class mxnet.executor.Executor(handle, symbol, ctx, grad_req, group2ctx)[source]

Executor is the object providing efficient symbolic graph execution and optimization.

Examples

>>> # typical approach to create an executor is to bind symbol
>>> a = mx.sym.Variable('a')
>>> b = mx.sym.Variable('b')
>>> c = 2 * a + b
>>> texec = c.bind(mx.cpu(), {'a': mx.nd.array([1,2]), 'b':mx.nd.array([2,3])})
__init__(handle, symbol, ctx, grad_req, group2ctx)[source]

Constructor, used Symbol.bind and Symbol.simple_bind instead.

Parameters:handle (ExecutorHandle) – ExecutorHandle generated by calling bind.

See also

Symbol.bind()
to create executor.

Methods

__init__(handle, symbol, ctx, grad_req, …) Constructor, used Symbol.bind and Symbol.simple_bind instead.
backward([out_grads, is_train]) Do backward pass to get the gradient of arguments.
copy_params_from(arg_params[, aux_params, …]) Copy parameters from arg_params, aux_params into executor’s internal array.
debug_str() Get a debug string about internal execution plan.
forward([is_train]) Calculate the outputs specified by the bound symbol.
reshape([partial_shaping, allow_up_sizing]) Return a new executor with the same symbol and shared memory, but different input/output shapes.
set_monitor_callback(callback) Install callback for monitor.

Attributes

arg_dict Get dictionary representation of argument arrrays.
aux_dict Get dictionary representation of auxiliary states arrays.
grad_dict Get dictionary representation of gradient arrays.
output_dict Get dictionary representation of output arrays.