KroneckerProductFB
Inherits From: FisherBlock
Defined in tensorflow/contrib/kfac/python/ops/fisher_blocks.py.
A base class for blocks with separate input and output Kronecker factors.
The Fisher block is approximated as a Kronecker product of the input and output factors.
num_registered_towersNumber of towers registered for this FisherBlock.
Typically equal to the number of towers in a multi-tower setup.
__init____init__(layer_collection)
Initialize self. See help(type(self)) for accurate signature.
full_fisher_blockfull_fisher_block()
Explicitly constructs the full Fisher block.
Used for testing purposes. (In general, the result may be very large.)
The full Fisher block.
instantiate_factorsinstantiate_factors(
grads_list,
damping
)
Creates and registers the component factors of this Fisher block.
grads_list: A list gradients (each a Tensor or tuple of Tensors) with respect to the tensors returned by tensors_to_compute_grads() that are to be used to estimate the block.damping: The damping factor (float or Tensor).multiplymultiply(vector)
Multiplies the vector by the (damped) block.
vector: The vector (a Tensor or tuple of Tensors) to be multiplied.The vector left-multiplied by the (damped) block.
multiply_inversemultiply_inverse(vector)
Multiplies the vector by the (damped) inverse of the block.
vector: The vector (a Tensor or tuple of Tensors) to be multiplied.The vector left-multiplied by the (damped) inverse of the block.
multiply_matpowermultiply_matpower(
vector,
exp
)
Multiplies the vector by the (damped) matrix-power of the block.
vector: The vector (a Tensor or tuple of Tensors) to be multiplied.exp: A float representing the power to raise the block by before multiplying it by the vector.The vector left-multiplied by the (damped) matrix-power of the block.
register_inverseregister_inverse()
Registers a matrix inverse to be computed by the block.
register_matpowerregister_matpower(exp)
Registers a matrix power to be computed by the block.
exp: A float representing the power to raise the block by.tensors_to_compute_gradstensors_to_compute_grads()
Returns the Tensor(s) with respect to which this FisherBlock needs grads.
© 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_blocks/KroneckerProductFB