class MXNet::Executor

Overview

Executor provides efficient symbolic graph execution and optimization.

Defined in:

mxnet/executor.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(handle) #

[View source]

Instance Method Detail

def backward(out_grads : Array(MXNet::NDArray) = [] of MXNet::NDArray, is_train : Bool = true) #

Do backward pass to calculate the gradients.

Parameters

  • out_grads (NDArray, optional) Gradients on the outputs to be propagated back. This parameter is only needed when Symbol#bind is called on outputs that are not a loss function.
  • is_train (Bool, default true) Whether this #backward call is for training. Note, in rare cases you may want to call #backward with is_train: false to calculate gradients during inference.

[View source]
def finalize #

[View source]
def forward(is_train : Bool = false) #

Calculate the outputs specified by the bound symbol.

Parameters

  • is_train (Bool, default false) Whether this #forward call is for training. If true, a #backward call is expected to follow.

[View source]