Symbolic API

class SymbolicNode

SymbolicNode is the basic building block of the symbolic graph in MXNet.jl.

deepcopy(self :: SymbolicNode)

Make a deep copy of a SymbolicNode.

copy(self :: SymbolicNode)

Make a copy of a SymbolicNode. The same as making a deep copy.

call(self :: SymbolicNode, args :: SymbolicNode...)
call(self :: SymbolicNode; kwargs...)

Make a new node by composing self with args. Or the arguments can be specified using keyword arguments.

list_arguments(self :: SymbolicNode)

List all the arguments of this node. The argument for a node contains both the inputs and parameters. For example, a FullyConnected node will have both data and weights in its arguments. A composed node (e.g. a MLP) will list all the arguments for intermediate nodes.

Returns:A list of symbols indicating the names of the arguments.
list_outputs(self :: SymbolicNode)

List all the outputs of this node.

Returns:A list of symbols indicating the names of the outputs.
list_auxiliary_states(self :: SymbolicNode)

List all auxiliary states in the symbool.

Auxiliary states are special states of symbols that do not corresponds to an argument, and do not have gradient. But still be useful for the specific operations. A common example of auxiliary state is the moving_mean and moving_variance in BatchNorm. Most operators do not have Auxiliary states.

Returns:A list of symbols indicating the names of the auxiliary states.
get_internals(self :: SymbolicNode)

Get a new grouped SymbolicNode whose output contains all the internal outputs of this SymbolicNode.

get_attr(self :: SymbolicNode, key :: Symbol)

Get attribute attached to this SymbolicNode belonging to key. :return: The value belonging to key as a Nullable.

set_attr(self:: SymbolicNode, key :: Symbol, value :: AbstractString)

Set the attribute key to value for this SymbolicNode.

Warning

It is encouraged not to call this function directly, unless you know exactly what you are doing. The recommended way of setting attributes is when creating the SymbolicNode. Changing the attributes of a SymbolicNode that is already been used somewhere else might cause unexpected behavior and inconsistency.

Variable(name :: Union{Symbol, AbstractString})

Create a symbolic variable with the given name. This is typically used as a placeholder. For example, the data node, acting as the starting point of a network architecture.

Parameters:AbstractString} attrs (Dict{Symbol,) – The attributes associated with this Variable.
Group(nodes :: SymbolicNode...)

Create a SymbolicNode by grouping nodes together.

infer_shape(self :: SymbolicNode; args...)
infer_shape(self :: SymbolicNode; kwargs...)

Do shape inference according to the input shapes. The input shapes could be provided as a list of shapes, which should specify the shapes of inputs in the same order as the arguments returned by list_arguments(). Alternatively, the shape information could be specified via keyword arguments.

Returns:A 3-tuple containing shapes of all the arguments, shapes of all the outputs and shapes of all the auxiliary variables. If shape inference failed due to incomplete or incompatible inputs, the return value will be (nothing, nothing, nothing).
getindex(self :: SymbolicNode, idx :: Union{Int, Base.Symbol, AbstractString})

Get a node representing the specified output of this node. The index could be a symbol or string indicating the name of the output, or a 1-based integer indicating the index, as in the list of list_outputs().

to_json(self :: SymbolicNode)

Convert a SymbolicNode into a JSON string.

from_json(repr :: AbstractString, ::Type{SymbolicNode})

Load a SymbolicNode from a JSON string representation.

load(filename :: AbstractString, ::Type{SymbolicNode})

Load a SymbolicNode from a JSON file.

save(filename :: AbstractString, node :: SymbolicNode)

Save a SymbolicNode to a JSON file.

libmxnet APIs

Public APIs

Activation(...)

Apply activation function to input.Softmax Activation is only available with CUDNN on GPUand will be computed at each location across channel if input is 4D.

Parameters:
  • data (SymbolicNode) – Input data to activation function.
  • act_type ({'relu', 'sigmoid', 'softrelu', 'tanh'}, required) – Activation function to be applied.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

BatchNorm(...)

Apply batch normalization to input.

Parameters:
  • data (SymbolicNode) – Input data to batch normalization
  • eps (float, optional, default=0.001) – Epsilon to prevent div 0
  • momentum (float, optional, default=0.9) – Momentum for moving average
  • fix_gamma (boolean, optional, default=True) – Fix gamma while training
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

BlockGrad(...)

Get output from a symbol and pass 0 gradient back

Parameters:
  • data (SymbolicNode) – Input data.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Cast(...)

Cast array to a different data type.

Parameters:
  • data (SymbolicNode) – Input data to cast function.
  • dtype ({'float16', 'float32', 'float64', 'int32', 'uint8'}, required) – Target data type.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Concat(...)

Perform an feature concat on channel dim (dim 1) over all the inputs.

This function support variable length positional SymbolicNode inputs.

Parameters:
  • data (SymbolicNode[]) – List of tensors to concatenate
  • num_args (int, required) – Number of inputs to be concated.
  • dim (int, optional, default='1') – the dimension to be concated.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Convolution(...)

Apply convolution to input then add a bias.

Parameters:
  • data (SymbolicNode) – Input data to the ConvolutionOp.
  • weight (SymbolicNode) – Weight matrix.
  • bias (SymbolicNode) – Bias parameter.
  • kernel (Shape(tuple), required) – convolution kernel size: (y, x)
  • stride (Shape(tuple), optional, default=(1,1)) – convolution stride: (y, x)
  • dilate (Shape(tuple), optional, default=(1,1)) – convolution dilate: (y, x)
  • pad (Shape(tuple), optional, default=(0,0)) – pad for convolution: (y, x)
  • num_filter (int (non-negative), required) – convolution filter(channel) number
  • num_group (int (non-negative), optional, default=1) – Number of groups partition. This option is not supported by CuDNN, you can use SliceChannel to num_group,apply convolution and concat instead to achieve the same need.
  • workspace (long (non-negative), optional, default=512) – Tmp workspace for convolution (MB).
  • no_bias (boolean, optional, default=False) – Whether to disable bias parameter.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Crop(...)

Crop the 2nd and 3rd dim of input data, with the corresponding size of w_h or with width and height of the second input symbol

This function support variable length positional SymbolicNode inputs.

Parameters:
  • num_args (int, required) – Number of inputs for crop, if equals one, then we will use the h_wfor crop heihgt and width, else if equals two, then we will use the heightand width of the second input symbol, we name crop_like here
  • offset (Shape(tuple), optional, default=(0,0)) – crop offset coordinate: (y, x)
  • h_w (Shape(tuple), optional, default=(0,0)) – crop height and weight: (h, w)
  • center_crop (boolean, optional, default=False) – If set to true, then it will use be the center_crop,or it will crop using the shape of crop_like
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Deconvolution(...)

Apply deconvolution to input then add a bias.

Parameters:
  • data (SymbolicNode) – Input data to the DeconvolutionOp.
  • weight (SymbolicNode) – Weight matrix.
  • bias (SymbolicNode) – Bias parameter.
  • kernel (Shape(tuple), required) – deconvolution kernel size: (y, x)
  • stride (Shape(tuple), optional, default=(1,1)) – deconvolution stride: (y, x)
  • pad (Shape(tuple), optional, default=(0,0)) – pad for deconvolution: (y, x)
  • num_filter (int (non-negative), required) – deconvolution filter(channel) number
  • num_group (int (non-negative), optional, default=1) – number of groups partition
  • workspace (long (non-negative), optional, default=512) – Tmp workspace for deconvolution (MB)
  • no_bias (boolean, optional, default=True) – Whether to disable bias parameter.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Dropout(...)

Apply dropout to input

Parameters:
  • data (SymbolicNode) – Input data to dropout.
  • p (float, optional, default=0.5) – Fraction of the input that gets dropped out at training time
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

ElementWiseSum(...)

Perform an elementwise sum over all the inputs.

This function support variable length positional SymbolicNode inputs.

Parameters:
  • num_args (int, required) – Number of inputs to be summed.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Embedding(...)

Get embedding for one-hot input

Parameters:
  • data (SymbolicNode) – Input data to the EmbeddingOp.
  • weight (SymbolicNode) – Enbedding weight matrix.
  • input_dim (int, required) – input dim of one-hot encoding
  • output_dim (int, required) – output dim of embedding
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Flatten(...)

Flatten input

Parameters:
  • data (SymbolicNode) – Input data to flatten.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

FullyConnected(...)

Apply matrix multiplication to input then add a bias.

Parameters:
  • data (SymbolicNode) – Input data to the FullyConnectedOp.
  • weight (SymbolicNode) – Weight matrix.
  • bias (SymbolicNode) – Bias parameter.
  • num_hidden (int, required) – Number of hidden nodes of the output.
  • no_bias (boolean, optional, default=False) – Whether to disable bias parameter.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

IdentityAttachKLSparseReg(...)

Apply a sparse regularization to the output a sigmoid activation function.

Parameters:
  • data (SymbolicNode) – Input data.
  • sparseness_target (float, optional, default=0.1) – The sparseness target
  • penalty (float, optional, default=0.001) – The tradeoff parameter for the sparseness penalty
  • momentum (float, optional, default=0.9) – The momentum for running average
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

LRN(...)

Apply convolution to input then add a bias.

Parameters:
  • data (SymbolicNode) – Input data to the ConvolutionOp.
  • alpha (float, optional, default=0.0001) – value of the alpha variance scaling parameter in the normalization formula
  • beta (float, optional, default=0.75) – value of the beta power parameter in the normalization formula
  • knorm (float, optional, default=2) – value of the k parameter in normalization formula
  • nsize (int (non-negative), required) – normalization window width in elements.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

LeakyReLU(...)

Apply activation function to input.

Parameters:
  • data (SymbolicNode) – Input data to activation function.
  • act_type ({'elu', 'leaky', 'prelu', 'rrelu'},optional, default='leaky') – Activation function to be applied.
  • slope (float, optional, default=0.25) – Init slope for the activation. (For leaky and elu only)
  • lower_bound (float, optional, default=0.125) – Lower bound of random slope. (For rrelu only)
  • upper_bound (float, optional, default=0.334) – Upper bound of random slope. (For rrelu only)
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

LinearRegressionOutput(...)

Use linear regression for final output, this is used on final output of a net.

Parameters:
  • data (SymbolicNode) – Input data to function.
  • label (SymbolicNode) – Input label to function.
  • grad_scale (float, optional, default=1) – Scale the gradient by a float factor
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

LogisticRegressionOutput(...)

Use Logistic regression for final output, this is used on final output of a net. Logistic regression is suitable for binary classification or probability prediction tasks.

Parameters:
  • data (SymbolicNode) – Input data to function.
  • label (SymbolicNode) – Input label to function.
  • grad_scale (float, optional, default=1) – Scale the gradient by a float factor
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

MAERegressionOutput(...)

Use mean absolute error regression for final output, this is used on final output of a net.

Parameters:
  • data (SymbolicNode) – Input data to function.
  • label (SymbolicNode) – Input label to function.
  • grad_scale (float, optional, default=1) – Scale the gradient by a float factor
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Pooling(...)

Perform spatial pooling on inputs.

Parameters:
  • data (SymbolicNode) – Input data to the pooling operator.
  • kernel (Shape(tuple), required) – pooling kernel size: (y, x)
  • pool_type ({'avg', 'max', 'sum'}, required) – Pooling type to be applied.
  • stride (Shape(tuple), optional, default=(1,1)) – stride: for pooling (y, x)
  • pad (Shape(tuple), optional, default=(0,0)) – pad for pooling: (y, x)
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

Reshape(...)

Reshape input to target shape

Parameters:
  • data (SymbolicNode) – Input data to reshape.
  • target_shape (Shape(tuple), required) – Target new shape. One and only one dim can be 0, in which case it will be inferred from the rest of dims
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

SliceChannel(...)

Slice channel into many outputs with equally divided channel

Parameters:
  • num_outputs (int, required) – Number of outputs to be sliced.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode[].

Softmax(...)

DEPRECATED: Perform a softmax transformation on input. Please use SoftmaxOutput

Parameters:
  • data (SymbolicNode) – Input data to softmax.
  • grad_scale (float, optional, default=1) – Scale the gradient by a float factor
  • ignore_label (float, optional, default=-1) – the ignore_label will not work in backward, and this only be used when multi_output=true
  • multi_output (boolean, optional, default=False) – If set to true, for a (n,k,x_1,..,x_n) dimensional input tensor, softmax will generate n*x_1*…*x_n output, each has k classes
  • use_ignore (boolean, optional, default=False) – If set to true, the ignore_label value will not contribute to the backward gradient
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

SoftmaxActivation(...)

Apply softmax activation to input. This is intended for internal layers. For output (loss layer) please use SoftmaxOutput. If type=instance, this operator will compute a softmax for each instance in the batch; this is the default mode. If type=channel, this operator will compute a num_channel-class softmax at each position of each instance; this can be used for fully convolutional network, image segmentation, etc.

Parameters:
  • data (SymbolicNode) – Input data to activation function.
  • type ({'channel', 'instance'},optional, default='instance') – Softmax Mode. If set to instance, this operator will compute a softmax for each instance in the batch; this is the default mode. If set to channel, this operator will compute a num_channel-class softmax at each position of each instance; this can be used for fully convolutional network, image segmentation, etc.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

SoftmaxOutput(...)

Perform a softmax transformation on input, backprop with logloss.

Parameters:
  • data (SymbolicNode) – Input data to softmax.
  • label (SymbolicNode) – Label data.
  • grad_scale (float, optional, default=1) – Scale the gradient by a float factor
  • ignore_label (float, optional, default=-1) – the ignore_label will not work in backward, and this only be used when multi_output=true
  • multi_output (boolean, optional, default=False) – If set to true, for a (n,k,x_1,..,x_n) dimensional input tensor, softmax will generate n*x_1*…*x_n output, each has k classes
  • use_ignore (boolean, optional, default=False) – If set to true, the ignore_label value will not contribute to the backward gradient
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

SwapAxis(...)

Apply swapaxis to input.

Parameters:
  • data (SymbolicNode) – Input data to the SwapAxisOp.
  • dim1 (int (non-negative), optional, default=0) – the first axis to be swapped.
  • dim2 (int (non-negative), optional, default=0) – the second axis to be swapped.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

UpSampling(...)

Perform nearest neighboor/bilinear up sampling to inputs

This function support variable length positional SymbolicNode inputs.

Parameters:
  • data (SymbolicNode[]) – Array of tensors to upsample
  • scale (int (non-negative), required) – Up sampling scale
  • num_filter (int (non-negative), optional, default=0) – Input filter. Only used by nearest sample_type.
  • sample_type ({'bilinear', 'nearest'}, required) – upsampling method
  • multi_input_mode ({'concat', 'sum'},optional, default='concat') – How to handle multiple input. concat means concatenate upsampled images along the channel dimension. sum means add all images together, only available for nearest neighbor upsampling.
  • num_args (int, required) – Number of inputs to be upsampled. For nearest neighbor upsampling, this can be 1-N; the size of output will be(scale*h_0,scale*w_0) and all other inputs will be upsampled to thesame size. For bilinear upsampling this must be 2; 1 input and 1 weight.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

abs(...)

Take absolute value of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

ceil(...)

Take ceil value of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

cos(...)

Take cos of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

exp(...)

Take exp of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

floor(...)

Take floor value of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

log(...)

Take log of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

round(...)

Take round value of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

rsqrt(...)

Take rsqrt of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

sign(...)

Take sign value of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

sin(...)

Take sin of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

sqrt(...)

Take sqrt of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

square(...)

Take square of the src

Parameters:
  • src (SymbolicNode) – Source symbolic input to the function
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

.

Internal APIs

Note

Document and signatures for internal API functions might be incomplete.

_CrossDeviceCopy(...)

Special op to copy data cross device

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Div(...)

Perform an elementwise div.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_DivScalar(...)

Perform an elementwise div.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Maximum(...)

Perform an elementwise power.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_MaximumScalar(...)

Perform an elementwise maximum.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Minimum(...)

Perform an elementwise power.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_MinimumScalar(...)

Perform an elementwise minimum.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Minus(...)

Perform an elementwise minus.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_MinusScalar(...)

Perform an elementwise minus.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Mul(...)

Perform an elementwise mul.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_MulScalar(...)

Perform an elementwise mul.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_NDArray(...)

Stub for implementing an operator implemented in native frontend language with ndarray.

Parameters:
  • info (, required) –
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Native(...)

Stub for implementing an operator implemented in native frontend language.

Parameters:
  • info (, required) –
  • need_top_grad (boolean, optional, default=True) – Whether this layer needs out grad for backward. Should be false for loss layers.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Plus(...)

Perform an elementwise plus.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_PlusScalar(...)

Perform an elementwise plus.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_Power(...)

Perform an elementwise power.

Parameters:
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.

_PowerScalar(...)

Perform an elementwise power.

Parameters:
  • array (SymbolicNode) – Input array operand to the operation.
  • scalar (float, required) – scalar value.
  • scalar_on_left (boolean, optional, default=False) – scalar operand is on the left.
  • name (Symbol) – The name of the SymbolicNode. (e.g. :my_symbol), optional.
  • AbstractString} attrs (Dict{Symbol,) – The attributes associated with this SymbolicNode.
Returns:

SymbolicNode.