torch.narrow(input, dim, start, length) → Tensor Returns a new tensor that is a narrowed version of input tensor. The dimension dim is input from start to start +length. The returned tensor and input tensor share the same underlying storage. Paramete
numpy.expand_dims(a, axis) Expand the shape of an array. Insert a new axis that will appear at the axis position in the expanded array shape. Parameters: a : array_like Input array. axis : int Position in the expanded axes where the new axis is place
repeat(*sizes) → Tensor Repeats this tensor along the specified dimensions. Unlike expand(), this function copies the tensor’s data. WARNING torch.repeat() behaves differently from numpy.repeat, but is more similar to numpy.tile. For the operator sim
torch.bmm(batch1, batch2, out=None) → Tensor Performs a batch matrix-matrix product of matrices stored in batch1 and batch2. batch1 and batch2 must be 3-D tensors each containing the same number of matrices. If batch1 is a (b×n×m)tensor, batch2 is a