W3cubDocs

/TensorFlow Python

tf.contrib.kfac.fisher_factors.compute_cov

tf.contrib.kfac.fisher_factors.compute_cov(
    tensor,
    tensor_right=None,
    normalizer=None
)

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

Compute the empirical second moment of the rows of a 2D Tensor.

This function is meant to be applied to random matrices for which the true row mean is zero, so that the true second moment equals the true covariance.

Args:

  • tensor: A 2D Tensor.
  • tensor_right: An optional 2D Tensor. If provided, this function computes the matrix product tensor^T * tensor_right instead of tensor^T * tensor.
  • normalizer: optional scalar for the estimator (by default, the normalizer is the number of rows of tensor).

Returns:

A square 2D Tensor with as many rows/cols as the number of input columns.

© 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/fisher_factors/compute_cov