W3cubDocs

/TensorFlow Python

tf.contrib.kfac.utils.layer_params_to_mat2d

tf.contrib.kfac.utils.layer_params_to_mat2d(vector)

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

Converts a vector shaped like layer parameters to a 2D matrix.

In particular, we reshape the weights/filter component of the vector to be 2D, flattening all leading (input) dimensions. If there is a bias component, we concatenate it to the reshaped weights/filter component.

Args:

  • vector: A Tensor or pair of Tensors shaped like layer parameters.

Returns:

A 2D Tensor with the same coefficients and the same output dimension.

© 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/layer_params_to_mat2d