(m1, m2)
return np.einsum('bij,bjk->bik', m1, m2)
Batch matrix multiply.

  Args:
    m1: input lhs matrix with shape (batch, n, m).
    m2: input rhs matrix with shape (batch, m, o).

  Returns:
    product matrix with shape (batch, n, o).
Batch matrix multiply.
Batch matrix multiply .
def _batch_mm(m1, m2):
  """Batch matrix multiply.

  Args:
    m1: input lhs matrix with shape (batch, n, m).
    m2: input rhs matrix with shape (batch, m, o).

  Returns:
    product matrix with shape (batch, n, o).
  """
  return np.einsum('bij,bjk->bik', m1, m2)
def _batch_mm ( m1 , m2 ) : return np . einsum ( 'bij,bjk->bik' , m1 , m2 )