Performs a batch matrix-matrix product of matrices stored in input
and mat2.
input and mat2 must be 3-D tensors each containing
the same number of matrices.
If input is a \((b \times n \times m)\) tensor, mat2 is a
\((b \times m \times p)\) tensor, out will be a
\((b \times n \times p)\) tensor.
$$
\mbox{out}_i = \mbox{input}_i \mathbin{@} \mbox{mat2}_i
$$