contrib.ndarray

Functions

AdaptiveAvgPooling2D([data, output_size, …])

Applies a 2D adaptive average pooling over a 4D input with the shape of (NCHW).

BatchNormWithReLU([data, gamma, beta, …])

Batch normalization with ReLU fusion.

BilinearResize2D([data, like, height, …])

Perform 2D resizing (upsampling or downsampling) for 4D input using bilinear interpolation.

CTCLoss([data, label, data_lengths, …])

Connectionist Temporal Classification Loss.

DeformableConvolution([data, offset, …])

Compute 2-D deformable convolution on 4-D input.

DeformablePSROIPooling([data, rois, trans, …])

Performs deformable position-sensitive region-of-interest pooling on inputs.

ModulatedDeformableConvolution([data, …])

Compute 2-D modulated deformable convolution on 4-D input.

MultiBoxDetection([cls_prob, loc_pred, …])

Convert multibox detection predictions.

MultiBoxPrior([data, sizes, ratios, clip, …])

Generate prior(anchor) boxes from data, sizes and ratios.

MultiBoxTarget([anchor, label, cls_pred, …])

Compute Multibox training targets

MultiProposal([cls_prob, bbox_pred, …])

Generate region proposals via RPN

PSROIPooling([data, rois, spatial_scale, …])

Performs region-of-interest pooling on inputs.

Proposal([cls_prob, bbox_pred, im_info, …])

Generate region proposals via RPN

ROIAlign([data, rois, pooled_size, …])

This operator takes a 4D feature map as an input array and region proposals as rois, then align the feature map over sub-regions of input and produces a fixed-sized output array.

RROIAlign([data, rois, pooled_size, …])

Performs Rotated ROI Align on the input array.

SparseEmbedding([data, weight, input_dim, …])

Maps integer indices to vector representations (embeddings).

SyncBatchNorm([data, gamma, beta, …])

Batch normalization.

allclose([a, b, rtol, atol, equal_nan, out, …])

This operators implements the numpy.allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)

arange_like([data, start, step, repeat, …])

Return an array with evenly spaced values.

backward_gradientmultiplier([data, scalar, …])

param data

source input

backward_hawkesll([out, name])

param out

The output NDArray to hold the result.

backward_index_copy([out, name])

param out

The output NDArray to hold the result.

backward_quadratic([out, name])

param out

The output NDArray to hold the result.

bipartite_matching([data, is_ascend, …])

Compute bipartite matching.

boolean_mask([data, index, axis, out, name])

Given an n-d NDArray data, and a 1-d NDArray index, the operator produces an un-predeterminable shaped n-d NDArray out, which stands for the rows in x where the corresonding element in index is non-zero.

box_decode([data, anchors, std0, std1, …])

Decode bounding boxes training target with normalized center offsets.

box_encode([samples, matches, anchors, …])

Encode bounding boxes training target with normalized center offsets.

box_iou([lhs, rhs, format, out, name])

Bounding box overlap of two arrays.

box_nms([data, overlap_thresh, …])

Apply non-maximum suppression to input.

box_non_maximum_suppression([data, …])

Apply non-maximum suppression to input.

calibrate_entropy([hist, hist_edges, …])

Provide calibrated min/max for input histogram.

count_sketch([data, h, s, out_dim, …])

Apply CountSketch to input: map a d-dimension data to k-dimension data”

ctc_loss([data, label, data_lengths, …])

Connectionist Temporal Classification Loss.

dequantize([data, min_range, max_range, …])

Dequantize the input tensor into a float tensor.

dgl_adjacency([data, out, name])

This operator converts a CSR matrix whose values are edge Ids to an adjacency matrix whose values are ones.

dgl_csr_neighbor_non_uniform_sample(…)

This operator samples sub-graph from a csr graph via an non-uniform probability.

dgl_csr_neighbor_uniform_sample(…)

This operator samples sub-graphs from a csr graph via an uniform probability.

dgl_graph_compact(*graph_data, **kwargs)

This operator compacts a CSR matrix generated by dgl_csr_neighbor_uniform_sample and dgl_csr_neighbor_non_uniform_sample.

dgl_subgraph(*data, **kwargs)

This operator constructs an induced subgraph for a given set of vertices from a graph.

div_sqrt_dim([data, out, name])

Rescale the input by the square root of the channel dimension.

edge_id([data, u, v, out, name])

This operator implements the edge_id function for a graph stored in a CSR matrix (the value of the CSR stores the edge Id of the graph).

fft([data, compute_size, out, name])

Apply 1D FFT to input”

getnnz([data, axis, out, name])

Number of stored values for a sparse tensor, including explicit zeros.

gradientmultiplier([data, scalar, is_int, …])

This operator implements the gradient multiplier function.

group_adagrad_update([weight, grad, …])

Update function for Group AdaGrad optimizer.

hawkesll([lda, alpha, beta, state, lags, …])

Computes the log likelihood of a univariate Hawkes process.

ifft([data, compute_size, out, name])

Apply 1D ifft to input”

index_array([data, axes, out, name])

Returns an array of indexes of the input array.

index_copy([old_tensor, index_vector, …])

Copies the elements of a new_tensor into the old_tensor.

interleaved_matmul_encdec_qk([queries, …])

Compute the matrix multiplication between the projections of queries and keys in multihead attention use as encoder-decoder.

interleaved_matmul_encdec_valatt([…])

Compute the matrix multiplication between the projections of values and the attention weights in multihead attention use as encoder-decoder.

interleaved_matmul_selfatt_qk([…])

Compute the matrix multiplication between the projections of queries and keys in multihead attention use as self attention.

interleaved_matmul_selfatt_valatt([…])

Compute the matrix multiplication between the projections of values and the attention weights in multihead attention use as self attention.

intgemm_fully_connected([data, weight, …])

Multiply matrices using 8-bit integers.

intgemm_maxabsolute([data, out, name])

Compute the maximum absolute value in a tensor of float32 fast on a CPU.

intgemm_prepare_data([data, maxabs, out, name])

This operator converts quantizes float32 to int8 while also banning -128.

intgemm_prepare_weight([weight, maxabs, …])

This operator converts a weight matrix in column-major format to intgemm’s internal fast representation of weight matrices.

intgemm_take_weight([weight, indices, out, name])

Index a weight matrix stored in intgemm’s weight format.

quadratic([data, a, b, c, out, name])

This operators implements the quadratic function.

quantize([data, min_range, max_range, …])

Quantize a input tensor from float to out_type, with user-specified min_range and max_range.

quantize_asym([data, min_calib_range, …])

Quantize a input tensor from float to uint8_t.

quantize_v2([data, out_type, …])

Quantize a input tensor from float to out_type, with user-specified min_calib_range and max_calib_range or the input range collected at runtime.

quantized_act([data, min_data, max_data, …])

Activation operator for input and output data type of int8.

quantized_batch_norm([data, gamma, beta, …])

BatchNorm operator for input and output data type of int8.

quantized_concat(*data, **kwargs)

Joins input arrays along a given axis.

quantized_conv([data, weight, bias, …])

Convolution operator for input, weight and bias data type of int8, and accumulates in type int32 for the output.

quantized_elemwise_add([lhs, rhs, lhs_min, …])

elemwise_add operator for input dataA and input dataB data type of int8,

quantized_elemwise_mul([lhs, rhs, lhs_min, …])

Multiplies arguments int8 element-wise.

quantized_embedding([data, weight, …])

Maps integer indices to int8 vector representations (embeddings).

quantized_flatten([data, min_data, …])

param data

A ndarray/symbol of type float32

quantized_fully_connected([data, weight, …])

Fully Connected operator for input, weight and bias data type of int8, and accumulates in type int32 for the output.

quantized_pooling([data, min_data, …])

Pooling operator for input and output data type of int8.

quantized_rnn([data, parameters, state, …])

RNN operator for input data type of uint8.

requantize([data, min_range, max_range, …])

Given data that is quantized in int32 and the corresponding thresholds, requantize the data into int8 using min and max thresholds either calculated at runtime or from calibration.

round_ste([data, out, name])

Straight-through-estimator of round().

sign_ste([data, out, name])

Straight-through-estimator of sign().