Table Of Contents
Table Of Contents

Symbol

Composition

Composite multiple symbols into a new one by an operator.

class mxnet.symbol.Symbol(handle)[source]

Symbol is symbolic graph of the mxnet.

Symbol.__call__(*args, **kwargs)

Composes symbol using inputs.

Arithmetic operations

Symbol.__add__(other)

x.__add__(y) <=> x+y

Symbol.__sub__(other)

x.__sub__(y) <=> x-y

Symbol.__rsub__(other)

x.__rsub__(y) <=> y-x

Symbol.__neg__()

x.__neg__() <=> -x

Symbol.__mul__(other)

x.__mul__(y) <=> x*y

Symbol.__div__(other)

x.__div__(y) <=> x/y

Symbol.__rdiv__(other)

x.__rdiv__(y) <=> y/x

Symbol.__mod__(other)

x.__mod__(y) <=> x%y

Symbol.__rmod__(other)

x.__rmod__(y) <=> y%x

Symbol.__pow__(other)

x.__pow__(y) <=> x**y

Trigonometric functions

Symbol.sin(*args, **kwargs)

Convenience fluent method for sin().

Symbol.cos(*args, **kwargs)

Convenience fluent method for cos().

Symbol.tan(*args, **kwargs)

Convenience fluent method for tan().

Symbol.arcsin(*args, **kwargs)

Convenience fluent method for arcsin().

Symbol.arccos(*args, **kwargs)

Convenience fluent method for arccos().

Symbol.arctan(*args, **kwargs)

Convenience fluent method for arctan().

Symbol.degrees(*args, **kwargs)

Convenience fluent method for degrees().

Symbol.radians(*args, **kwargs)

Convenience fluent method for radians().

Hyperbolic functions

Symbol.sinh(*args, **kwargs)

Convenience fluent method for sinh().

Symbol.cosh(*args, **kwargs)

Convenience fluent method for cosh().

Symbol.tanh(*args, **kwargs)

Convenience fluent method for tanh().

Symbol.arcsinh(*args, **kwargs)

Convenience fluent method for arcsinh().

Symbol.arccosh(*args, **kwargs)

Convenience fluent method for arccosh().

Symbol.arctanh(*args, **kwargs)

Convenience fluent method for arctanh().

Exponents and logarithms

Symbol.exp(*args, **kwargs)

Convenience fluent method for exp().

Symbol.expm1(*args, **kwargs)

Convenience fluent method for expm1().

Symbol.log(*args, **kwargs)

Convenience fluent method for log().

Symbol.log10(*args, **kwargs)

Convenience fluent method for log10().

Symbol.log2(*args, **kwargs)

Convenience fluent method for log2().

Symbol.log1p(*args, **kwargs)

Convenience fluent method for log1p().

Powers

Symbol.sqrt(*args, **kwargs)

Convenience fluent method for sqrt().

Symbol.rsqrt(*args, **kwargs)

Convenience fluent method for rsqrt().

Symbol.cbrt(*args, **kwargs)

Convenience fluent method for cbrt().

Symbol.rcbrt(*args, **kwargs)

Convenience fluent method for rcbrt().

Symbol.square(*args, **kwargs)

Convenience fluent method for square().

Basic neural network functions

Symbol.relu(*args, **kwargs)

Convenience fluent method for relu().

Symbol.sigmoid(*args, **kwargs)

Convenience fluent method for sigmoid().

Symbol.softmax(*args, **kwargs)

Convenience fluent method for softmax().

Symbol.log_softmax(*args, **kwargs)

Convenience fluent method for log_softmax().

Comparison operators

Symbol.__lt__(other)

x.__lt__(y) <=> x<y

Symbol.__le__(other)

x.__le__(y) <=> x<=y

Symbol.__gt__(other)

x.__gt__(y) <=> x>y

Symbol.__ge__(other)

x.__ge__(y) <=> x>=y

Symbol.__eq__(other)

x.__eq__(y) <=> x==y

Symbol.__ne__(other)

x.__ne__(y) <=> x!=y

Symbol creation

Symbol.zeros_like(*args, **kwargs)

Convenience fluent method for zeros_like().

Symbol.ones_like(*args, **kwargs)

Convenience fluent method for ones_like().

Symbol.diag([k])

Convenience fluent method for diag().

Changing shape and type

Symbol.astype(*args, **kwargs)

Convenience fluent method for cast().

Symbol.shape_array(*args, **kwargs)

Convenience fluent method for shape_array().

Symbol.size_array(*args, **kwargs)

Convenience fluent method for size_array().

Symbol.reshape(*args, **kwargs)

Convenience fluent method for reshape().

Symbol.reshape_like(*args, **kwargs)

Convenience fluent method for reshape_like().

Symbol.flatten(*args, **kwargs)

Convenience fluent method for flatten().

Symbol.expand_dims(*args, **kwargs)

Convenience fluent method for expand_dims().

Expanding elements

Symbol.broadcast_to(*args, **kwargs)

Convenience fluent method for broadcast_to().

Symbol.broadcast_axes(*args, **kwargs)

Convenience fluent method for broadcast_axes().

Symbol.broadcast_like(*args, **kwargs)

Convenience fluent method for broadcast_like().

Symbol.tile(*args, **kwargs)

Convenience fluent method for tile().

Symbol.pad(*args, **kwargs)

Convenience fluent method for pad().

Rearranging elements

Symbol.transpose(*args, **kwargs)

Convenience fluent method for transpose().

Symbol.swapaxes(*args, **kwargs)

Convenience fluent method for swapaxes().

Symbol.flip(*args, **kwargs)

Convenience fluent method for flip().

Symbol.depth_to_space(*args, **kwargs)

Convenience fluent method for depth_to_space().

Symbol.space_to_depth(*args, **kwargs)

Convenience fluent method for space_to_depth().

Reduce functions

Symbol.sum(*args, **kwargs)

Convenience fluent method for sum().

Symbol.nansum(*args, **kwargs)

Convenience fluent method for nansum().

Symbol.prod(*args, **kwargs)

Convenience fluent method for prod().

Symbol.nanprod(*args, **kwargs)

Convenience fluent method for nanprod().

Symbol.mean(*args, **kwargs)

Convenience fluent method for mean().

Symbol.max(*args, **kwargs)

Convenience fluent method for max().

Symbol.min(*args, **kwargs)

Convenience fluent method for min().

Symbol.norm(*args, **kwargs)

Convenience fluent method for norm().

Rounding

Symbol.round(*args, **kwargs)

Convenience fluent method for round().

Symbol.rint(*args, **kwargs)

Convenience fluent method for rint().

Symbol.fix(*args, **kwargs)

Convenience fluent method for fix().

Symbol.floor(*args, **kwargs)

Convenience fluent method for floor().

Symbol.ceil(*args, **kwargs)

Convenience fluent method for ceil().

Symbol.trunc(*args, **kwargs)

Convenience fluent method for trunc().

Sorting and searching

Symbol.sort(*args, **kwargs)

Convenience fluent method for sort().

Symbol.argsort(*args, **kwargs)

Convenience fluent method for argsort().

Symbol.topk(*args, **kwargs)

Convenience fluent method for topk().

Symbol.argmax(*args, **kwargs)

Convenience fluent method for argmax().

Symbol.argmin(*args, **kwargs)

Convenience fluent method for argmin().

Symbol.argmax_channel(*args, **kwargs)

Convenience fluent method for argmax_channel().

Query information

Symbol.name

Gets name string from the symbol, this function only works for non-grouped symbol.

Symbol.list_arguments()

Lists all the arguments in the symbol.

Symbol.list_outputs()

Lists all the outputs in the symbol.

Symbol.list_auxiliary_states()

Lists all the auxiliary states in the symbol.

Symbol.list_attr([recursive])

Gets all attributes from the symbol.

Symbol.attr(key)

Returns the attribute string for corresponding input key from the symbol.

Symbol.attr_dict()

Recursively gets all attributes from the symbol and its children.

Indexing

Symbol.slice(*args, **kwargs)

Convenience fluent method for slice().

Symbol.slice_axis(*args, **kwargs)

Convenience fluent method for slice_axis().

Symbol.slice_like(*args, **kwargs)

Convenience fluent method for slice_like().

Symbol.take(*args, **kwargs)

Convenience fluent method for take().

Symbol.one_hot(*args, **kwargs)

Convenience fluent method for one_hot().

Symbol.pick(*args, **kwargs)

Convenience fluent method for pick().

Get internal and output symbol

Symbol.__getitem__(index)

x.__getitem__(i) <=> x[i]

Symbol.__iter__()

Returns a generator object of symbol.

Symbol.get_internals()

Gets a new grouped symbol sgroup.

Symbol.get_children()

Gets a new grouped symbol whose output contains inputs to output nodes of the original symbol.

Inference type and shape

Symbol.infer_type(*args, **kwargs)

Infers the type of all arguments and all outputs, given the known types for some arguments.

Symbol.infer_shape(*args, **kwargs)

Infers the shapes of all arguments and all outputs given the known shapes of some arguments.

Symbol.infer_shape_partial(*args, **kwargs)

Infers the shape partially.

Bind

Symbol.bind(ctx, args[, args_grad, …])

Binds the current symbol to an executor and returns it.

Symbol.simple_bind(ctx[, grad_req, …])

Bind current symbol to get an executor, allocate all the arguments needed.

Save

Symbol.save(fname)

Saves symbol to a file.

Symbol.tojson()

Saves symbol to a JSON string.

Symbol.debug_str()

Gets a debug string of symbol.

Miscellaneous

Symbol.clip(*args, **kwargs)

Convenience fluent method for clip().

Symbol.sign(*args, **kwargs)

Convenience fluent method for sign().