W3cubDocs

/TensorFlow Python

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.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/kfac/utils/matmul_diag_sparse