batch_dot¶
-
batch_dot(lhs=None, rhs=None, transpose_a=_Null, transpose_b=_Null, forward_stype=_Null, out=None, name=None, **kwargs)¶ Batchwise dot product.
batch_dotis used to compute dot product ofxandywhenxandyare data in batch, namely N-D (N >= 3) arrays in shape of (B0, …, B_i, :, :).For example, given
xwith shape (B_0, …, B_i, N, M) andywith shape (B_0, …, B_i, M, K), the result array will have shape (B_0, …, B_i, N, K), which is computed by:batch_dot(x,y)[b_0, ..., b_i, :, :] = dot(x[b_0, ..., b_i, :, :], y[b_0, ..., b_i, :, :])
Defined in src/operator/tensor/dot.cc:L127
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 : ndarray or list of ndarrays
The output of this function.