mxnet.ndarray.batch_dot¶
-
mxnet.ndarray.
batch_dot
(lhs=None, rhs=None, transpose_a=_Null, transpose_b=_Null, forward_stype=_Null, out=None, name=None, **kwargs)¶ Batchwise dot product.
batch_dot
is used to compute dot product ofx
andy
whenx
andy
are data in batch, namely 3D arrays in shape of (batch_size, :, :).For example, given
x
with shape (batch_size, n, m) andy
with shape (batch_size, m, k), the result array will have shape (batch_size, n, k), which is computed by:batch_dot(x,y)[i,:,:] = dot(x[i,:,:], y[i,:,:])
Defined in src/operator/tensor/dot.cc:L125
- Parameters
lhs (NDArray) – The first input
rhs (NDArray) – The second input
transpose_a (boolean, optional, default=0) – If true then transpose the first input before dot.
transpose_b (boolean, optional, default=0) – If true then transpose the second input before dot.
forward_stype ({None, 'csr', 'default', 'row_sparse'},optional, default='None') – The desired storage type of the forward output given by user, if thecombination of input storage types and this hint does not matchany implemented ones, the dot operator will perform fallback operationand still produce an output of the desired storage type.
out (NDArray, optional) – The output NDArray to hold the result.
- Returns
out – The output of this function.
- Return type
NDArray or list of NDArrays