Invoke symbol as function on inputs.
Invoke symbol as function on inputs.
resulting symbol name
provide named symbols
the resulting symbol
Get attribute string from the symbol, this function only works for non-grouped symbol.
Get attribute string from the symbol, this function only works for non-grouped symbol.
The key to get attribute from.
value The attribute value of the key, returns None if attribute do not exist.
Recursively gets all attributes from the symbol and its children.
Recursively gets all attributes from the symbol and its children.
Map[Map[String, String]], There is a key in the returned dict for every child with non-empty attribute set. For each symbol, the name of the symbol is its key in the dict and the correspond value is that symbol's attribute list (itself a dictionary).
Bind current symbol to get an executor.
Bind current symbol to get an executor.
Context The device context the generated executor to run on.
Input arguments to the symbol.
When specified, args_grad provide NDArrays to hold the result of gradient value in backward.
{'write', 'add', 'null'}, or list of str or dict of str to str, optional Specifies how we should update the gradient to the args_grad.
Input auxiliary states to the symbol, only need to specify when list_auxiliary_states is not empty.
The dict mapping the
attribute to the context assignment.ctx_group
Executor to share memory with.
The generated Executor
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 and this parameter can be safely ignored.
User can give up gradient by using a dict in args_grad and only specify gradient they interested in.
Off-Heap Bytes Allocated for this object
Off-Heap Bytes Allocated for this object
Get a debug string.
Get a debug string.
Debug string of the symbol.
Get a new grouped symbol whose output contains all the internal outputs of this symbol.
Get a new grouped symbol whose output contains all the internal outputs of this symbol.
The internal of the symbol.
Infer the shape of outputs and arguments of given known shapes of arguments.
Infer the shape of outputs and arguments of given known shapes of arguments. User can either pass in the known shapes in positional way or keyword argument way. Tuple of Nones is returned if there is not enough information passed in. An error will be raised if there is inconsistency found in the known shapes passed in.
Provide keyword arguments of known shapes.
argShapes List of shapes of arguments. The order is in the same order as list_arguments() outShapes List of shapes of outputs. The order is in the same order as list_outputs() auxShapes List of shapes of outputs. The order is in the same order as list_auxiliary()
Infer the shape of outputs and arguments of given known shapes of arguments.
Infer the shape of outputs and arguments of given known shapes of arguments. User can either pass in the known shapes in positional way or keyword argument way. Tuple of Nones is returned if there is not enough information passed in. An error will be raised if there is inconsistency found in the known shapes passed in.
Provide shape of arguments in a positional way. Unknown shape can be marked as None
argShapes List of shapes of arguments. The order is in the same order as list_arguments() outShapes List of shapes of outputs. The order is in the same order as list_outputs() auxShapes List of shapes of outputs. The order is in the same order as list_auxiliary()
Infer the type of outputs and arguments of given known types of arguments.
Infer the type of outputs and arguments of given known types of arguments. Tuple of Nones is returned if there is not enough information passed in. An error will be raised if there is inconsistency found in the known types passed in.
Provide keyword arguments of known types.
argTypes : list of numpy.dtype or None List of types of arguments. The order is in the same order as list_arguments() outTypes : list of numpy.dtype or None List of types of outputs. The order is in the same order as list_outputs() auxTypes : list of numpy.dtype or None List of types of outputs. The order is in the same order as list_auxiliary()
Infer the type of outputs and arguments of given known types of arguments.
Infer the type of outputs and arguments of given known types of arguments. Tuple of Nones is returned if there is not enough information passed in. An error will be raised if there is inconsistency found in the known types passed in.
Provide type of arguments in a positional way. Unknown type can be marked as null
argTypes : list of numpy.dtype or None List of types of arguments. The order is in the same order as list_arguments() outTypes : list of numpy.dtype or None List of types of outputs. The order is in the same order as list_outputs() auxTypes : list of numpy.dtype or None List of types of outputs. The order is in the same order as list_auxiliary()
List all the arguments in the symbol.
List all the arguments in the symbol.
Array of all the arguments.
Gets all attributes from the symbol.
Gets all attributes from the symbol.
Map[String, String], mapping attribute keys to values.
List all auxiliary states in the symbol.
List all auxiliary states in the symbol.
The names of the auxiliary states.
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.
List all outputs in the symbol.
List all outputs in the symbol.
: List of all the outputs.
native Address associated with this object
native Address associated with this object
Function Pointer to the NativeDeAllocator of nativeAddress
Function Pointer to the NativeDeAllocator of nativeAddress
Call NativeResource.register to get the reference
Call NativeResource.register to get the reference
Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.
Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.
NativeResourceRef that tracks reachability of this object using PhantomReference
Save symbol into file.
Save symbol into file. You can also use pickle to do the job if you only work on python. The advantage of load/save is the file is language agnostic. This means the file saved using save can be loaded by other language binding of mxnet. You also get the benefit being able to directly load/save from cloud storage(S3, HDFS)
The name of the file
Symbol.load : Used to load symbol from file.
Bind current symbol to get an executor, allocate all the ndarrays needed.
Bind current symbol to get an executor, allocate all the ndarrays needed. Allows specifying data types. This function will ask user to pass in ndarray of position they like to bind to, and it will automatically allocate the ndarray for arguments and auxiliary states that user did not specify explicitly.
The device context the generated executor to run on.
{'write', 'add', 'null'}, or list of str or dict of str to str, optional Specifies how we should update the gradient to the args_grad.
Input shape dictionary, name->shape
Input type dictionary, name->dtype
The generated Executor
Save symbol into a JSON string.
Save symbol into a JSON string. See Also symbol.loadJson : Used to load symbol from JSON string.
Symbolic configuration API of mxnet.
WARNING: it is your responsibility to clear this object through dispose().