NP Extensions

Compatibility

set_np([shape, array]) Setting NumPy shape and array semantics at the same time.
reset_np() Deactivate NumPy shape and array semantics at the same time.
is_np_array
use_np_array
is_np_shape
use_np_shape
np_array
np_shape

Devices

cpu([device_id]) Returns a CPU context.
cpu_pinned([device_id]) Returns a CPU pinned memory context.
gpu([device_id]) Returns a GPU context.
gpu_memory_info([device_id]) Query CUDA for the free and total bytes of GPU global memory.
current_context() Returns the current context.
num_gpus() Query CUDA for the number of GPUs present.

Nerual networks

activation([data, act_type, out, name]) Applies an activation function element-wise to the input.
batch_norm([data, gamma, beta, moving_mean, …]) Batch normalization.
convolution([data, weight, bias, kernel, …]) Compute N-D convolution on (N+2)-D input.
dropout([data, p, mode, axes, cudnn_off, …]) Applies dropout operation to input array.
embedding([data, weight, input_dim, …]) Maps integer indices to vector representations (embeddings).
fully_connected([data, weight, bias, …]) Applies a linear transformation: \(Y = XW^T + b\).
layer_norm([data, gamma, beta, axis, eps, …]) Layer normalization.
pooling([data, kernel, pool_type, …]) Performs pooling on the input.
rnn([data, parameters, state, state_cell, …]) Applies recurrent layers to input data.
leaky_relu([data, gamma, act_type, slope, …]) Applies Leaky rectified linear unit activation element-wise to the input.
multibox_detection([cls_prob, loc_pred, …]) Convert multibox detection predictions.
multibox_prior([data, sizes, ratios, clip, …]) Generate prior(anchor) boxes from data, sizes and ratios.
multibox_target([anchor, label, cls_pred, …]) Compute Multibox training targets
roi_pooling([data, rois, pooled_size, …]) Performs region of interest(ROI) pooling on the input array.

More operators

sigmoid([data, out, name]) Computes sigmoid of x element-wise.
smooth_l1([data, scalar, out, name]) Calculate Smooth L1 Loss(lhs, scalar) by summing
softmax([data, length, axis, temperature, …]) Applies the softmax function.
threading Thread module emulating a subset of Java’s threading model.
topk([data, axis, k, ret_typ, is_ascend, …]) Returns the indices of the top k elements in an input array along the given
waitall() Wait for all async operations to finish in MXNet.
load(file) Loads an array from file.
save(file, arr) Saves a list of ndarray`s or a dict of `str->`ndarray` to file.
one_hot([indices, depth, on_value, …]) Returns a one-hot array.
pick([data, index, axis, keepdims, mode, …]) Picks elements from an input array according to the input indices along the given axis.
reshape_like([lhs, rhs, lhs_begin, lhs_end, …]) Reshape some or all dimensions of lhs to have the same shape as some or all dimensions of rhs.
batch_flatten([data, out, name]) Flattens the input array into a 2-D array by collapsing the higher dimensions.
batch_dot([lhs, rhs, transpose_a, …]) Batchwise dot product.
gamma([data, out, name]) Returns the gamma function (extension of the factorial function to the reals), computed element-wise on the input array.
sequence_mask([data, sequence_length, …]) Sets all elements outside the sequence to a constant value.
seed