tf.contrib.kfac.utils.matmul_diag_sparse

tf.contrib.kfac.utils.matmul_diag_sparse(
    A_diag,
    B,
    name=None
)

Defined in tensorflow/contrib/kfac/python/ops/utils.py.

Computes matmul(A, B) where A is a diagonal matrix, B is sparse.

Args:

  • A_diag: diagonal entries of matrix A of shape [m, m].
  • B: tf.IndexedSlices. Represents matrix of shape [m, n].
  • name: str. Name of op.

Returns:

tf.IndexedSlices resulting from matmul(A, B).

Raises:

  • ValueError: If A_diag is not rank-1.
  • ValueError: If B doesn't represent a matrix.