SYMBOL INDEX (1212 symbols across 44 files) FILE: kfac/examples/autoencoder_mnist.py function make_train_op (line 143) | def make_train_op(minibatch, class AutoEncoder (line 243) | class AutoEncoder(snt.AbstractModule): method __init__ (line 246) | def __init__(self, method _build (line 277) | def _build(self, inputs): class MLPManualReg (line 284) | class MLPManualReg(snt.AbstractModule): method __init__ (line 286) | def __init__(self, method _build (line 310) | def _build(self, inputs, layer_collection=None): class AutoEncoderManualReg (line 330) | class AutoEncoderManualReg(snt.AbstractModule): method __init__ (line 333) | def __init__(self, method _build (line 365) | def _build(self, inputs, layer_collection=None): function get_keras_autoencoder (line 372) | def get_keras_autoencoder(**input_kwargs): function compute_squared_error (line 426) | def compute_squared_error(logits, targets): function compute_loss (line 432) | def compute_loss(logits=None, function load_mnist (line 455) | def load_mnist(): function _get_batch_size_schedule (line 493) | def _get_batch_size_schedule(minibatch_maxsize): function construct_train_quants (line 506) | def construct_train_quants(): function main (line 567) | def main(_): FILE: kfac/examples/autoencoder_mnist_tpu_estimator.py function make_train_op (line 58) | def make_train_op(minibatch, function compute_squared_error (line 96) | def compute_squared_error(logits, targets): function compute_loss (line 102) | def compute_loss(logits, labels): function mnist_input_fn (line 113) | def mnist_input_fn(params): function print_tensors (line 125) | def print_tensors(**tensors): function _model_fn (line 138) | def _model_fn(features, labels, mode, params): function make_tpu_run_config (line 212) | def make_tpu_run_config(master, seed, model_dir, iterations_per_loop, function main (line 224) | def main(argv): FILE: kfac/examples/autoencoder_mnist_tpu_strategy.py function make_train_op (line 62) | def make_train_op(minibatch, function compute_squared_error (line 100) | def compute_squared_error(logits, targets): function compute_loss (line 106) | def compute_loss(logits, labels, model): function mnist_input_fn (line 115) | def mnist_input_fn(batch_size): function _train_step (line 127) | def _train_step(batch): function train (line 181) | def train(): function main (line 212) | def main(argv): FILE: kfac/examples/classifier_mnist.py class Model (line 141) | class Model(snt.AbstractModule): method _build (line 144) | def _build(self, inputs): function make_train_op (line 173) | def make_train_op(minibatch, function compute_loss (line 272) | def compute_loss(logits=None, function load_mnist (line 296) | def load_mnist(): function _get_batch_size_schedule (line 334) | def _get_batch_size_schedule(num_examples): function group_assign (line 349) | def group_assign(dest, source): function make_eval_ops (line 353) | def make_eval_ops(train_vars, ema): function construct_train_quants (line 383) | def construct_train_quants(): function main (line 448) | def main(_): FILE: kfac/examples/classifier_mnist_tpu_estimator.py function make_train_op (line 58) | def make_train_op(minibatch, function mnist_input_fn (line 96) | def mnist_input_fn(params): function print_tensors (line 108) | def print_tensors(**tensors): function _model_fn (line 121) | def _model_fn(features, labels, mode, params): function make_tpu_run_config (line 193) | def make_tpu_run_config(master, seed, model_dir, iterations_per_loop, function main (line 205) | def main(argv): FILE: kfac/examples/convnet.py function fc_layer (line 69) | def fc_layer(layer_id, inputs, output_size): function conv_layer (line 97) | def conv_layer(layer_id, inputs, kernel_size, out_channels): function max_pool_layer (line 129) | def max_pool_layer(layer_id, inputs, kernel_size, stride): function build_model (line 152) | def build_model(examples, function minimize_loss_single_machine (line 210) | def minimize_loss_single_machine(loss, function minimize_loss_single_machine_manual (line 268) | def minimize_loss_single_machine_manual(loss, function _is_gradient_task (line 337) | def _is_gradient_task(task_id, num_tasks): function _is_cov_update_task (line 344) | def _is_cov_update_task(task_id, num_tasks): function _is_inv_update_task (line 351) | def _is_inv_update_task(task_id, num_tasks): function _num_gradient_tasks (line 358) | def _num_gradient_tasks(num_tasks): function _make_distributed_train_op (line 365) | def _make_distributed_train_op( function distributed_grads_only_and_ops_chief_worker (line 406) | def distributed_grads_only_and_ops_chief_worker( function distributed_grads_and_ops_dedicated_workers (line 485) | def distributed_grads_and_ops_dedicated_workers( function train_mnist_single_machine (line 557) | def train_mnist_single_machine(num_epochs, function train_mnist_multitower (line 607) | def train_mnist_multitower(num_epochs, num_towers, function train_mnist_distributed_sync_replicas (line 703) | def train_mnist_distributed_sync_replicas(task_id, function train_mnist_estimator (line 764) | def train_mnist_estimator(num_epochs, use_fake_data=False): FILE: kfac/examples/mnist.py function load_mnist_as_tensors (line 32) | def load_mnist_as_tensors(flatten_images=True, dtype=tf.float32): function load_mnist_as_dataset (line 74) | def load_mnist_as_dataset(flatten_images=True): function load_mnist_as_iterator (line 92) | def load_mnist_as_iterator(num_epochs, batch_size, FILE: kfac/examples/rnn_mnist.py function make_train_op (line 96) | def make_train_op(batch_size, function eval_model (line 166) | def eval_model(x, num_classes, layer_collection=None): function compute_loss (line 252) | def compute_loss(inputs, labels, num_classes, layer_collection=None): function load_mnist (line 274) | def load_mnist(): function main (line 312) | def main(_): FILE: kfac/python/keras/callbacks.py class HyperparameterDecay (line 27) | class HyperparameterDecay(tf.keras.callbacks.Callback): method __init__ (line 30) | def __init__(self, hyperparameter, num_delay_steps=0, verbose=0): method on_train_begin (line 45) | def on_train_begin(self, logs=None): method on_epoch_begin (line 53) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 60) | def on_epoch_end(self, epoch, logs=None): method _get_global_step (line 65) | def _get_global_step(self): class PolynomialDecay (line 70) | class PolynomialDecay(HyperparameterDecay): method __init__ (line 83) | def __init__(self, method on_batch_begin (line 107) | def on_batch_begin(self, batch, logs=None): class ExponentialDecay (line 116) | class ExponentialDecay(HyperparameterDecay): method __init__ (line 137) | def __init__(self, method on_batch_begin (line 181) | def on_batch_begin(self, batch, logs=None): FILE: kfac/python/keras/optimizers.py function _configure_kfac_kwargs_for_adaptive (line 53) | def _configure_kfac_kwargs_for_adaptive(kfac_kwargs, adaptive): class Kfac (line 105) | class Kfac(tf.keras.optimizers.Optimizer): method __init__ (line 108) | def __init__(self, # pylint: disable=invalid-name method name (line 261) | def name(self): method name (line 266) | def name(self, value): method optimizer (line 276) | def optimizer(self): method layers (line 291) | def layers(self): method mutable_hyperparameters (line 295) | def mutable_hyperparameters(self): method register_layers (line 298) | def register_layers(self, model=None, loss=None, layer_collection=None): method register_train_batch (line 310) | def register_train_batch(self, train_batch, batch_size=None): method minimize (line 330) | def minimize(self, loss, var_list, grad_loss=None, name=None): method apply_gradients (line 337) | def apply_gradients(self, grads_and_vars, name=None): method get_updates (line 341) | def get_updates(self, loss, params): method get_config (line 344) | def get_config(self): method _create_optimizer (line 350) | def _create_optimizer(self): method _call_and_track_vars (line 402) | def _call_and_track_vars(self, method_name, *args, **kwargs): method _set_hyper (line 422) | def _set_hyper(self, name, value): FILE: kfac/python/keras/saving_utils.py function _compile_args_from_training_config (line 38) | def _compile_args_from_training_config(training_config, custom_objects=N... function load_model (line 69) | def load_model(filepath, custom_objects=None, optimizer_name=None): FILE: kfac/python/keras/utils.py function get_parent (line 48) | def get_parent(node): function serialize_loss (line 70) | def serialize_loss(loss): function serialize_fisher_approx (line 85) | def serialize_fisher_approx(fisher_approx): function _get_verified_dict (line 96) | def _get_verified_dict(container, container_name, layer_names): function register_layer (line 119) | def register_layer(layer_collection, layer, fisher_approx=None, **kwargs): function register_loss (line 227) | def register_loss(layer_collection, layer, loss, **kwargs): function get_layer_collection (line 276) | def get_layer_collection(model, function get_loss_fn (line 400) | def get_loss_fn(model, FILE: kfac/python/kernel_tests/data_reader_test.py class DataReaderTest (line 28) | class DataReaderTest(tf.test.TestCase): method test_read_batch (line 30) | def test_read_batch(self): method test_cached_batch (line 50) | def test_cached_batch(self): FILE: kfac/python/kernel_tests/estimator_test.py class EstimatorTest (line 39) | class EstimatorTest(tf.test.TestCase): method setUp (line 41) | def setUp(self): method testEstimatorInitManualRegistration (line 61) | def testEstimatorInitManualRegistration(self): method testVariableWrongNumberOfUses (line 93) | def testVariableWrongNumberOfUses(self, mock_uses): method testInvalidEstimationMode (line 102) | def testInvalidEstimationMode(self): method testGradientsModeBuild (line 112) | def testGradientsModeBuild(self): method testEmpiricalModeBuild (line 122) | def testEmpiricalModeBuild(self): method testCurvaturePropModeBuild (line 132) | def testCurvaturePropModeBuild(self): method testExactModeBuild (line 142) | def testExactModeBuild(self): method test_cov_update_thunks (line 152) | def test_cov_update_thunks(self): method test_round_robin_placement (line 201) | def test_round_robin_placement(self): method test_inv_update_thunks (line 237) | def test_inv_update_thunks(self): FILE: kfac/python/kernel_tests/graph_search_test.py function _build_model (line 32) | def _build_model(): function _build_mock_records (line 64) | def _build_mock_records(): function assert_fisher_blocks_match (line 101) | def assert_fisher_blocks_match(test_case, layer_collection_a, function sparse_softmax_cross_entropy (line 121) | def sparse_softmax_cross_entropy(labels, class GraphSearchTestCase (line 142) | class GraphSearchTestCase(tf.test.TestCase): method testRegisterLayers (line 144) | def testRegisterLayers(self): method test_register_records_order (line 175) | def test_register_records_order(self): method test_multitower_examples_model (line 215) | def test_multitower_examples_model(self): method test_multitower_multi_loss_function (line 297) | def test_multitower_multi_loss_function(self): method test_filter_user_registered_records (line 335) | def test_filter_user_registered_records(self): method test_filter_grouped_variable_records (line 356) | def test_filter_grouped_variable_records(self): method test_filter_subgraph_records (line 383) | def test_filter_subgraph_records(self): method test_rnn_multi (line 394) | def test_rnn_multi(self): method test_graph_search_match_fail (line 484) | def test_graph_search_match_fail(self): method test_specify_approximation (line 515) | def test_specify_approximation(self): method test_specify_approximation_shared_parameters (line 580) | def test_specify_approximation_shared_parameters(self): method test_tied_weights_untied_bias_registered_weights (line 613) | def test_tied_weights_untied_bias_registered_weights(self): method test_tied_weights_untied_bias_registered_affine (line 641) | def test_tied_weights_untied_bias_registered_affine(self): method test_tied_weights_untied_bias (line 675) | def test_tied_weights_untied_bias(self): method test_tied_weights_untied_bias_registered_bias (line 694) | def test_tied_weights_untied_bias_registered_bias(self): method test_multi_time_batch_fold (line 714) | def test_multi_time_batch_fold(self): method test_multiple_weights (line 752) | def test_multiple_weights(self): method test_subset_weights_manual_registration (line 783) | def test_subset_weights_manual_registration(self): method mixed_usage_test (line 818) | def mixed_usage_test(self): method test_resource_variable (line 842) | def test_resource_variable(self): FILE: kfac/python/kernel_tests/keras_callbacks_test.py class HyperParamTracker (line 32) | class HyperParamTracker(tf.keras.callbacks.Callback): method __init__ (line 35) | def __init__(self, hyper, record_list, frequency): method on_batch_end (line 40) | def on_batch_end(self, batch, logs=None): method on_epoch_end (line 46) | def on_epoch_end(self, epoch, logs=None): class CallbacksTest (line 53) | class CallbacksTest(parameterized.TestCase, tf.test.TestCase): method __init__ (line 55) | def __init__(self, *args, **kwargs): method setUp (line 62) | def setUp(self): method testPolynomialDecayValues (line 67) | def testPolynomialDecayValues(self): method testExponentialDampingValuesWithDecayRate (line 95) | def testExponentialDampingValuesWithDecayRate(self): method testExponentialDampingValuesWithFinalValue (line 122) | def testExponentialDampingValuesWithFinalValue(self): method testExponentialDampingValuesWithFinalValueAndRate (line 151) | def testExponentialDampingValuesWithFinalValueAndRate(self): method testTrainHistory (line 191) | def testTrainHistory(self, hyper, callback): method testDampingDecayFailsWithNoDamping (line 201) | def testDampingDecayFailsWithNoDamping(self): method testExponentialDampingFailsNoRateOrFinalValue (line 210) | def testExponentialDampingFailsNoRateOrFinalValue(self): method testExponentialDampingFailsWithAllOptionals (line 215) | def testExponentialDampingFailsWithAllOptionals(self): FILE: kfac/python/kernel_tests/keras_optimizers_test.py function _get_synthetic_mnist_dataset (line 37) | def _get_synthetic_mnist_dataset(train_size=64, test_size=16): function _get_synthetic_mnist_train_tensors (line 52) | def _get_synthetic_mnist_train_tensors( function _generate_target_fn (line 60) | def _generate_target_fn(num_examples): function _generate_regression_data (line 83) | def _generate_regression_data(num_eg, num_train_eg): function _simple_mlp (line 99) | def _simple_mlp(): function _mnist_model (line 107) | def _mnist_model(use_bias=True, use_separate_activation=True): function _train_model (line 151) | def _train_model(data, class KfacOptimizerTest (line 185) | class KfacOptimizerTest(parameterized.TestCase, tf.test.TestCase): method __init__ (line 187) | def __init__(self, *args, **kwargs): method setUp (line 191) | def setUp(self): method testFunctionalInstantiation (line 196) | def testFunctionalInstantiation(self): method testSequentialInstantiation (line 204) | def testSequentialInstantiation(self): method testInstantiationWithLayerCollection (line 215) | def testInstantiationWithLayerCollection(self): method testRNNFails (line 223) | def testRNNFails(self): method testBiasAndActivations (line 238) | def testBiasAndActivations(self, use_bias, use_separate_activation): method testRegression (line 243) | def testRegression(self): method testClipNormFails (line 249) | def testClipNormFails(self): method testClipValueFails (line 254) | def testClipValueFails(self): method testLossTensor (line 259) | def testLossTensor(self): method testArgsKwargs (line 266) | def testArgsKwargs(self): method testConfig (line 305) | def testConfig(self): method testFromConfig (line 333) | def testFromConfig(self, kwargs_updates): method testGettingHyper (line 362) | def testGettingHyper(self, hyper_ctor): method testGettingVariableHyperFails (line 376) | def testGettingVariableHyperFails(self): method testSetTFVariableHyper (line 389) | def testSetTFVariableHyper(self, name, val): method testSetFloatHyper (line 409) | def testSetFloatHyper(self, name, val): method testModifyingTensorHypersFails (line 429) | def testModifyingTensorHypersFails(self, name, val): method testLRBackwardsCompatibility (line 440) | def testLRBackwardsCompatibility(self): method testMultipleLossTraining (line 456) | def testMultipleLossTraining(self): method testRegisterLayersWithModel (line 481) | def testRegisterLayersWithModel(self, loss): method testRegisterLayersWithLayerCollection (line 488) | def testRegisterLayersWithLayerCollection(self): method testRegisterLayersCompiledModel (line 498) | def testRegisterLayersCompiledModel(self, loss): method testTrainWithoutCreatingOptimizerFails (line 506) | def testTrainWithoutCreatingOptimizerFails(self): method testEmptyCreateKfacOptimizerFails (line 514) | def testEmptyCreateKfacOptimizerFails(self): method testSeed (line 519) | def testSeed(self): method testNewOptSameVarScope (line 525) | def testNewOptSameVarScope(self): method testGetSetWeights (line 534) | def testGetSetWeights(self): method testTrainModelWithNormalization (line 577) | def testTrainModelWithNormalization(self, has_shift): method testTrainModelWithFusedBN (line 595) | def testTrainModelWithFusedBN(self, has_shift): method testTrainModelWithFusedBNAndLearningPhase (line 610) | def testTrainModelWithFusedBNAndLearningPhase(self, has_shift): method testCustomTrainingLoopSequential (line 627) | def testCustomTrainingLoopSequential(self, input_conv_kwargs): method testCustomTrainingLoopFunctionalInpTensor (line 650) | def testCustomTrainingLoopFunctionalInpTensor(self): method testCustomTrainingLoopFunctionalInpShape (line 673) | def testCustomTrainingLoopFunctionalInpShape(self): method testCustomTrainingLoopMakeOptimizerBeforeModelCall (line 699) | def testCustomTrainingLoopMakeOptimizerBeforeModelCall(self): method testCustomTrainingUnwrappedTensorFails (line 723) | def testCustomTrainingUnwrappedTensorFails(self): method testTrainingNestedModel (line 741) | def testTrainingNestedModel(self): method testCustomTrainLoopNestedModel (line 759) | def testCustomTrainLoopNestedModel(self): method testMutableHypers (line 795) | def testMutableHypers(self, not_mutable, kwargs_update): method testPositionalArgsFail (line 802) | def testPositionalArgsFail(self): method testSettingName (line 807) | def testSettingName(self): method testAdaptiveModelFit (line 824) | def testAdaptiveModelFit(self, adaptive_kwargs): method testAdaptiveModelFitBatchnorm (line 842) | def testAdaptiveModelFitBatchnorm(self, is_fused): method testInferredBatchSize (line 861) | def testInferredBatchSize(self): method testInferredBatchSizeFail (line 882) | def testInferredBatchSizeFail(self, kfac_kwargs): method testOverrideAdaptiveDefaults (line 891) | def testOverrideAdaptiveDefaults(self): method testAdaptiveWithLR (line 915) | def testAdaptiveWithLR(self, kfac_kwargs): method testCustomLossFn (line 925) | def testCustomLossFn(self): method testRegisterTrainBatch (line 949) | def testRegisterTrainBatch(self): FILE: kfac/python/kernel_tests/keras_saving_utils_test.py class SavingUtilsTest (line 55) | class SavingUtilsTest(tf.test.TestCase): method test_sequential_model_saving (line 58) | def test_sequential_model_saving(self): method test_functional_model_saving (line 115) | def test_functional_model_saving(self): method test_saving_model_with_long_layer_names (line 151) | def test_saving_model_with_long_layer_names(self): method test_saving_model_with_long_weights_names (line 194) | def test_saving_model_with_long_weights_names(self): method test_model_saving_to_pre_created_h5py_file (line 243) | def test_model_saving_to_pre_created_h5py_file(self): method test_saving_constant_initializer_with_numpy (line 284) | def test_saving_constant_initializer_with_numpy(self): FILE: kfac/python/kernel_tests/keras_utils_test.py function _mlp (line 34) | def _mlp(): function _cnn (line 44) | def _cnn(): function _two_loss_model (line 54) | def _two_loss_model(num_branch1_outputs=1, num_branch2_outputs=9): class GetLayerCollectionTest (line 70) | class GetLayerCollectionTest(parameterized.TestCase, tf.test.TestCase): method setUp (line 72) | def setUp(self): method testValidLogitLossFunctionsCNN (line 84) | def testValidLogitLossFunctionsCNN(self, loss, kfac_loss): method testValidLogitLossFunctionsMLP (line 105) | def testValidLogitLossFunctionsMLP(self, loss, kfac_loss): method testValidMSE (line 123) | def testValidMSE(self, loss, model_builder): method testInvalidLossFunctions (line 139) | def testInvalidLossFunctions(self, loss): method testLayerRegistration (line 145) | def testLayerRegistration(self, model_builder): method testMultipleLoss (line 166) | def testMultipleLoss(self, loss, loss_weights): method testMultipleLossWeights (line 196) | def testMultipleLossWeights(self, loss_weights): method testLossErrors (line 215) | def testLossErrors(self, loss): method testLossWeightErrors (line 227) | def testLossWeightErrors(self, loss_weights): method testInvalidCNNLayers (line 237) | def testInvalidCNNLayers(self, layer): method testFisherApproxLayerNames (line 248) | def testFisherApproxLayerNames(self, fisher_approx): method testFisherApproxLayerClass (line 275) | def testFisherApproxLayerClass(self, fisher_approx, block_types): method testFisherApproxErrors (line 289) | def testFisherApproxErrors(self, fisher_approx): method testSerializeFisherApprox (line 306) | def testSerializeFisherApprox(self, approx, correctly_serialized_approx): method testSeed (line 310) | def testSeed(self): method testNormalizationLayers (line 315) | def testNormalizationLayers(self, has_shift): method testErrorWithBatchNormNoScale (line 336) | def testErrorWithBatchNormNoScale(self): method testErrorWithLayerNormNoScale (line 345) | def testErrorWithLayerNormNoScale(self): method testNumBatchNormUsesWithPhase (line 354) | def testNumBatchNormUsesWithPhase(self): method testNumBatchNormUsesNoPhase (line 365) | def testNumBatchNormUsesNoPhase(self): method testModelAsCallable (line 375) | def testModelAsCallable(self): method testNestedModels (line 405) | def testNestedModels(self, fisher_approx): method testMultiOutputNestedModelFails (line 447) | def testMultiOutputNestedModelFails(self): class SerializeLossTest (line 462) | class SerializeLossTest(tf.test.TestCase, parameterized.TestCase): method testSerializeLoss (line 473) | def testSerializeLoss(self, loss, correctly_serialized_loss): class GetLossFnTest (line 478) | class GetLossFnTest(tf.test.TestCase, parameterized.TestCase): method setUp (line 480) | def setUp(self): method testCrossEntropy (line 492) | def testCrossEntropy(self, loss, label_shape, is_logits, use_regulariz... method testCrossEntropyCustomLoop (line 531) | def testCrossEntropyCustomLoop(self, loss): method testMSE (line 558) | def testMSE(self, loss): method testMultiLoss (line 576) | def testMultiLoss(self, multi_loss, loss_weights): FILE: kfac/python/kernel_tests/layer_collection_test.py class MockFisherBlock (line 29) | class MockFisherBlock(object): method __init__ (line 34) | def __init__(self, name='MockFisherBlock'): method __eq__ (line 37) | def __eq__(self, other): method __hash__ (line 40) | def __hash__(self): class LayerParametersDictTest (line 44) | class LayerParametersDictTest(tf.test.TestCase): method testSetItem (line 46) | def testSetItem(self): method testSetItemOverlap (line 64) | def testSetItemOverlap(self): class LayerCollectionTest (line 81) | class LayerCollectionTest(tf.test.TestCase): method testLayerCollectionInit (line 83) | def testLayerCollectionInit(self): method testRegisterBlocks (line 89) | def testRegisterBlocks(self): method testRegisterBlocksMultipleRegistrations (line 151) | def testRegisterBlocksMultipleRegistrations(self): method testRegisterSingleParamNotRegistered (line 161) | def testRegisterSingleParamNotRegistered(self): method testShouldRegisterSingleParamRegistered (line 167) | def testShouldRegisterSingleParamRegistered(self): method testRegisterSingleParamRegisteredInTuple (line 175) | def testRegisterSingleParamRegisteredInTuple(self): method testRegisterTupleParamNotRegistered (line 184) | def testRegisterTupleParamNotRegistered(self): method testRegisterTupleParamRegistered (line 193) | def testRegisterTupleParamRegistered(self): method testRegisterTupleParamRegisteredInSuperset (line 203) | def testRegisterTupleParamRegisteredInSuperset(self): method testRegisterTupleParamSomeRegistered (line 214) | def testRegisterTupleParamSomeRegistered(self): method testRegisterTupleVarSomeRegisteredInOtherTuples (line 225) | def testRegisterTupleVarSomeRegisteredInOtherTuples(self): method testRegisterCategoricalPredictiveDistribution (line 237) | def testRegisterCategoricalPredictiveDistribution(self): method testLossFunctionByName (line 252) | def testLossFunctionByName(self): method testLossFunctionWithoutName (line 271) | def testLossFunctionWithoutName(self): method testCategoricalPredictiveDistributionMultipleMinibatches (line 282) | def testCategoricalPredictiveDistributionMultipleMinibatches(self): method testRegisterCategoricalPredictiveDistributionBatchSize1 (line 324) | def testRegisterCategoricalPredictiveDistributionBatchSize1(self): method testRegisterCategoricalPredictiveDistributionSpecifiedTargets (line 332) | def testRegisterCategoricalPredictiveDistributionSpecifiedTargets(self): method testRegisterNormalPredictiveDistribution (line 343) | def testRegisterNormalPredictiveDistribution(self): method testRegisterNormalPredictiveDistributionSpecifiedTargets (line 359) | def testRegisterNormalPredictiveDistributionSpecifiedTargets(self): method ensureLayerReuseWorks (line 371) | def ensureLayerReuseWorks(self, register_fn): method testRegisterFullyConnectedReuse (line 412) | def testRegisterFullyConnectedReuse(self): method testRegisterConv2dReuse (line 427) | def testRegisterConv2dReuse(self): method testReuseWithInvalidRegistration (line 447) | def testReuseWithInvalidRegistration(self): method testMakeOrGetFactor (line 464) | def testMakeOrGetFactor(self): method testMakeOrGetFactorCustomScope (line 478) | def testMakeOrGetFactorCustomScope(self): method testIdentifyLinkedParametersSomeRegisteredInOtherTuples (line 492) | def testIdentifyLinkedParametersSomeRegisteredInOtherTuples(self): method testIdentifySubsetPreviouslyRegisteredTensor (line 502) | def testIdentifySubsetPreviouslyRegisteredTensor(self): method testSpecifyApproximation (line 511) | def testSpecifyApproximation(self): method testDefaultLayerCollection (line 552) | def testDefaultLayerCollection(self): FILE: kfac/python/kernel_tests/loss_functions_test.py class InsertSliceInZerosTest (line 28) | class InsertSliceInZerosTest(tf.test.TestCase): method testBadShape (line 30) | def testBadShape(self): method test3d (line 35) | def test3d(self): class CategoricalLogitsNegativeLogProbLossTest (line 44) | class CategoricalLogitsNegativeLogProbLossTest(tf.test.TestCase): method testSample (line 46) | def testSample(self): method testEvaluateOnTargets (line 59) | def testEvaluateOnTargets(self): method testEvaluateOnSample (line 82) | def testEvaluateOnSample(self): method testMultiplyFisherSingleVector (line 97) | def testMultiplyFisherSingleVector(self): method testMultiplyFisherBatch (line 116) | def testMultiplyFisherBatch(self): class OnehotCategoricalLogitsNegativeLogProbLossTest (line 134) | class OnehotCategoricalLogitsNegativeLogProbLossTest(tf.test.TestCase): method testSample (line 136) | def testSample(self): method testEvaluateOnTargets (line 149) | def testEvaluateOnTargets(self): method testEvaluateOnSample (line 172) | def testEvaluateOnSample(self): FILE: kfac/python/kernel_tests/op_queue_test.py class OpQueueTest (line 27) | class OpQueueTest(tf.test.TestCase): method testNextOp (line 29) | def testNextOp(self): FILE: kfac/python/kernel_tests/optimizer_test.py function dummy_layer_collection (line 30) | def dummy_layer_collection(): class OptimizerTest (line 37) | class OptimizerTest(tf.test.TestCase): method testOptimizerInitInvalidMomentumRegistration (line 39) | def testOptimizerInitInvalidMomentumRegistration(self): method testOptimizerInit (line 44) | def testOptimizerInit(self): method testSquaredFisherNorm (line 73) | def testSquaredFisherNorm(self): method testUpdateClipCoeff (line 83) | def testUpdateClipCoeff(self): method testUpdateVelocities (line 112) | def testUpdateVelocities(self): method testApplyGradients (line 148) | def testApplyGradients(self): FILE: kfac/python/kernel_tests/periodic_inv_cov_update_kfac_opt_test.py function _construct_layer_collection (line 32) | def _construct_layer_collection(layers, all_logits, var_list): class PeriodicInvCovUpdateKfacOptTest (line 43) | class PeriodicInvCovUpdateKfacOptTest(tf.test.TestCase): method test_train (line 45) | def test_train(self): FILE: kfac/python/kernel_tests/utils_test.py class SequenceDictTest (line 27) | class SequenceDictTest(tf.test.TestCase): method testSequenceDictInit (line 29) | def testSequenceDictInit(self): method testSequenceDictInitWithIterable (line 33) | def testSequenceDictInitWithIterable(self): method testGetItemSingleKey (line 39) | def testGetItemSingleKey(self): method testGetItemMultipleKeys (line 43) | def testGetItemMultipleKeys(self): method testSetItemSingleKey (line 47) | def testSetItemSingleKey(self): method testSetItemMultipleKeys (line 52) | def testSetItemMultipleKeys(self): class SubGraphTest (line 60) | class SubGraphTest(tf.test.TestCase): method testBasicGraph (line 62) | def testBasicGraph(self): method testRepeatedAdds (line 73) | def testRepeatedAdds(self): method testFilterList (line 82) | def testFilterList(self): method testVariableUses (line 92) | def testVariableUses(self): method testVariableUsesRelayOps (line 104) | def testVariableUsesRelayOps(self): class UtilsTest (line 117) | class UtilsTest(tf.test.TestCase): method _fully_connected_layer_params (line 119) | def _fully_connected_layer_params(self): method _conv_layer_params (line 124) | def _conv_layer_params(self): method testFullyConnectedLayerParamsTupleToMat2d (line 131) | def testFullyConnectedLayerParamsTupleToMat2d(self): method testFullyConnectedLayerParamsTensorToMat2d (line 140) | def testFullyConnectedLayerParamsTensorToMat2d(self): method testConvLayerParamsTupleToMat2d (line 148) | def testConvLayerParamsTupleToMat2d(self): method testKron (line 155) | def testKron(self): method testMat2dToFullyConnectedLayerParamsTuple (line 165) | def testMat2dToFullyConnectedLayerParamsTuple(self): method testMat2dToFullyConnectedLayerParamsTensor (line 179) | def testMat2dToFullyConnectedLayerParamsTensor(self): method testTensorsToColumn (line 189) | def testTensorsToColumn(self): method testColumnToTensors (line 213) | def testColumnToTensors(self): method testPosDefInvCholesky (line 243) | def testPosDefInvCholesky(self): method testPosDefInvMatrixInverse (line 258) | def testPosDefInvMatrixInverse(self): method testBatchExecute (line 273) | def testBatchExecute(self): method testExtractConvolutionPatches (line 309) | def testExtractConvolutionPatches(self): method testExtractPointwiseConv2dPatches (line 354) | def testExtractPointwiseConv2dPatches(self): class AccumulatorVariableTest (line 388) | class AccumulatorVariableTest(tf.test.TestCase): method test_assign_to_var (line 390) | def test_assign_to_var(self): method test_accumulation (line 426) | def test_accumulation(self): FILE: kfac/python/ops/curvature_matrix_vector_products.py class CurvatureMatrixVectorProductComputer (line 28) | class CurvatureMatrixVectorProductComputer(object): method __init__ (line 59) | def __init__(self, layer_collection, wrt_tensors, method _loss_colocation_ops (line 77) | def _loss_colocation_ops(self): method _losses (line 81) | def _losses(self): method _inputs_to_losses (line 85) | def _inputs_to_losses(self): method _inputs_to_losses_flat (line 89) | def _inputs_to_losses_flat(self): method _total_loss (line 93) | def _total_loss(self): method _get_loss_coeff (line 96) | def _get_loss_coeff(self, loss): method _multiply_jacobian (line 100) | def _multiply_jacobian(self, vecs): method _multiply_jacobian_transpose (line 110) | def _multiply_jacobian_transpose(self, loss_vecs): method _multiply_across_losses (line 123) | def _multiply_across_losses(self, mult_func, vecs, coeff_mode="regular"): method _multiply_loss_fisher (line 135) | def _multiply_loss_fisher(self, loss_vecs): method _multiply_loss_fisher_factor (line 140) | def _multiply_loss_fisher_factor(self, loss_inner_vecs): method _multiply_loss_fisher_factor_transpose (line 146) | def _multiply_loss_fisher_factor_transpose(self, loss_vecs): method _multiply_loss_ggn (line 152) | def _multiply_loss_ggn(self, loss_vecs): method _multiply_loss_ggn_factor (line 157) | def _multiply_loss_ggn_factor(self, loss_inner_vecs): method _multiply_loss_ggn_factor_transpose (line 163) | def _multiply_loss_ggn_factor_transpose(self, loss_vecs): method multiply_fisher (line 170) | def multiply_fisher(self, vecs): method multiply_fisher_factor_transpose (line 176) | def multiply_fisher_factor_transpose(self, vecs): method multiply_fisher_factor (line 181) | def multiply_fisher_factor(self, loss_inner_vecs): method multiply_hessian (line 187) | def multiply_hessian(self, vecs): method multiply_ggn (line 198) | def multiply_ggn(self, vecs): method multiply_ggn_factor_transpose (line 204) | def multiply_ggn_factor_transpose(self, vecs): method multiply_ggn_factor (line 209) | def multiply_ggn_factor(self, loss_inner_vecs): method fisher_factor_inner_shapes (line 217) | def fisher_factor_inner_shapes(self): method fisher_factor_inner_static_shapes (line 222) | def fisher_factor_inner_static_shapes(self): method ggn_factor_inner_shapes (line 227) | def ggn_factor_inner_shapes(self): method ggn_factor_inner_static_shapes (line 232) | def ggn_factor_inner_static_shapes(self): FILE: kfac/python/ops/estimator.py function make_fisher_estimator (line 35) | def make_fisher_estimator(placement_strategy=None, **kwargs): class FisherEstimator (line 69) | class FisherEstimator(object): method __init__ (line 79) | def __init__(self, method variables (line 196) | def variables(self): method damping (line 200) | def damping(self): method blocks (line 204) | def blocks(self): method factors (line 209) | def factors(self): method name (line 214) | def name(self): method layers (line 218) | def layers(self): method mat_type (line 222) | def mat_type(self): method params_stats (line 226) | def params_stats(self): method _place_and_compute_transformation_thunks (line 230) | def _place_and_compute_transformation_thunks(self, thunks, params_list): method _compute_transformation (line 248) | def _compute_transformation(self, vecs_and_vars, transform): method multiply_inverse (line 281) | def multiply_inverse(self, vecs_and_vars): method multiply (line 293) | def multiply(self, vecs_and_vars): method multiply_matpower (line 305) | def multiply_matpower(self, exp, vecs_and_vars): method multiply_cholesky (line 320) | def multiply_cholesky(self, vecs_and_vars, transpose=False): method multiply_cholesky_inverse (line 336) | def multiply_cholesky_inverse(self, vecs_and_vars, transpose=False): method _instantiate_factors (line 361) | def _instantiate_factors(self): method _register_matrix_functions (line 415) | def _register_matrix_functions(self): method _finalize (line 424) | def _finalize(self): method _check_batch_sizes (line 433) | def _check_batch_sizes(self, factor): method _create_ops_and_vars_thunks (line 463) | def _create_ops_and_vars_thunks(self, scope=None): method create_ops_and_vars_thunks (line 515) | def create_ops_and_vars_thunks(self, scope=None): method make_vars_and_create_op_thunks (line 548) | def make_vars_and_create_op_thunks(self, scope=None): method get_cov_vars (line 580) | def get_cov_vars(self): method get_inv_vars (line 592) | def get_inv_vars(self): method _create_cov_variable_thunk (line 604) | def _create_cov_variable_thunk(self, factor, scope): method _create_cov_update_thunk (line 613) | def _create_cov_update_thunk(self, factor, scope): method _create_inv_variable_thunk (line 631) | def _create_inv_variable_thunk(self, factor, scope): method _create_inv_update_thunk (line 640) | def _create_inv_update_thunk(self, factor, scope): method _get_grads_lists_gradients (line 649) | def _get_grads_lists_gradients(self, tensors): method _get_grads_lists_empirical (line 659) | def _get_grads_lists_empirical(self, tensors): method _get_transformed_random_signs (line 669) | def _get_transformed_random_signs(self): method _get_grads_lists_curvature_prop (line 687) | def _get_grads_lists_curvature_prop(self, tensors): method _get_grads_lists_exact (line 698) | def _get_grads_lists_exact(self, tensors): class FisherEstimatorRoundRobin (line 727) | class FisherEstimatorRoundRobin(placement.RoundRobinPlacementMixin, class FisherEstimatorReplicaRoundRobin (line 733) | class FisherEstimatorReplicaRoundRobin( FILE: kfac/python/ops/fisher_blocks.py function set_global_constants (line 63) | def set_global_constants(normalize_damping_power=None, pi_type=None): function normalize_damping (line 75) | def normalize_damping(damping, num_replications): function compute_pi_tracenorm (line 82) | def compute_pi_tracenorm(left_cov, right_cov): function compute_pi_adjusted_damping (line 115) | def compute_pi_adjusted_damping(left_cov, right_cov, damping): class PackagedFunc (line 126) | class PackagedFunc(object): method __init__ (line 132) | def __init__(self, func, func_id): method __call__ (line 144) | def __call__(self): method func_id (line 148) | def func_id(self): function _package_func (line 153) | def _package_func(func, func_id): class FisherBlock (line 158) | class FisherBlock(object): method __init__ (line 166) | def __init__(self, layer_collection): method instantiate_factors (line 170) | def instantiate_factors(self, grads_list, damping): method register_matpower (line 182) | def register_matpower(self, exp): method register_cholesky (line 191) | def register_cholesky(self): method register_cholesky_inverse (line 196) | def register_cholesky_inverse(self): method register_inverse (line 200) | def register_inverse(self): method multiply_matpower (line 205) | def multiply_matpower(self, vector, exp): method multiply_inverse (line 218) | def multiply_inverse(self, vector): method multiply (line 229) | def multiply(self, vector): method multiply_cholesky (line 241) | def multiply_cholesky(self, vector, transpose=False): method multiply_cholesky_inverse (line 255) | def multiply_cholesky_inverse(self, vector, transpose=False): method tensors_to_compute_grads (line 268) | def tensors_to_compute_grads(self): method num_registered_towers (line 274) | def num_registered_towers(self): class FullFB (line 283) | class FullFB(FisherBlock): method register_matpower (line 286) | def register_matpower(self, exp): method register_cholesky (line 289) | def register_cholesky(self): method register_cholesky_inverse (line 292) | def register_cholesky_inverse(self): method _multiply_matrix (line 295) | def _multiply_matrix(self, matrix, vector, transpose=False): method multiply_matpower (line 300) | def multiply_matpower(self, vector, exp): method multiply_cholesky (line 304) | def multiply_cholesky(self, vector, transpose=False): method multiply_cholesky_inverse (line 308) | def multiply_cholesky_inverse(self, vector, transpose=False): method full_fisher_block (line 312) | def full_fisher_block(self): class NaiveFullFB (line 317) | class NaiveFullFB(FullFB): method __init__ (line 327) | def __init__(self, layer_collection, params): method instantiate_factors (line 339) | def instantiate_factors(self, grads_list, damping): method tensors_to_compute_grads (line 345) | def tensors_to_compute_grads(self): method register_additional_tower (line 348) | def register_additional_tower(self, batch_size): method num_registered_towers (line 357) | def num_registered_towers(self): method _batch_size (line 361) | def _batch_size(self): class DiagonalFB (line 366) | class DiagonalFB(FisherBlock): method register_matpower (line 369) | def register_matpower(self, exp): method register_cholesky (line 374) | def register_cholesky(self): method register_cholesky_inverse (line 379) | def register_cholesky_inverse(self): method _multiply_matrix (line 384) | def _multiply_matrix(self, matrix, vector): method multiply_matpower (line 389) | def multiply_matpower(self, vector, exp): method multiply_cholesky (line 393) | def multiply_cholesky(self, vector, transpose=False): method multiply_cholesky_inverse (line 397) | def multiply_cholesky_inverse(self, vector, transpose=False): method full_fisher_block (line 401) | def full_fisher_block(self): class NaiveDiagonalFB (line 405) | class NaiveDiagonalFB(DiagonalFB): method __init__ (line 414) | def __init__(self, layer_collection, params): method instantiate_factors (line 426) | def instantiate_factors(self, grads_list, damping): method tensors_to_compute_grads (line 432) | def tensors_to_compute_grads(self): method register_additional_tower (line 435) | def register_additional_tower(self, batch_size): method num_registered_towers (line 444) | def num_registered_towers(self): method _batch_size (line 448) | def _batch_size(self): class InputOutputMultiTower (line 452) | class InputOutputMultiTower(object): method __init__ (line 455) | def __init__(self, *args, **kwargs): method _process_data (line 460) | def _process_data(self, grads_list): method tensors_to_compute_grads (line 514) | def tensors_to_compute_grads(self): method register_additional_tower (line 518) | def register_additional_tower(self, inputs, outputs): method num_registered_towers (line 523) | def num_registered_towers(self): method _inputs (line 529) | def _inputs(self): method _outputs (line 533) | def _outputs(self): class FullyConnectedDiagonalFB (line 537) | class FullyConnectedDiagonalFB(InputOutputMultiTower, DiagonalFB): method __init__ (line 560) | def __init__(self, layer_collection, has_bias=False): method instantiate_factors (line 573) | def instantiate_factors(self, grads_list, damping): class ConvDiagonalFB (line 583) | class ConvDiagonalFB(InputOutputMultiTower, DiagonalFB): method __init__ (line 608) | def __init__(self, method _factor_implementation (line 669) | def _factor_implementation(self): method instantiate_factors (line 672) | def instantiate_factors(self, grads_list, damping): class ScaleAndShiftFullFB (line 695) | class ScaleAndShiftFullFB(InputOutputMultiTower, FullFB): method __init__ (line 704) | def __init__(self, layer_collection, broadcast_dims_scale, method instantiate_factors (line 723) | def instantiate_factors(self, grads_list, damping): class ScaleAndShiftDiagonalFB (line 735) | class ScaleAndShiftDiagonalFB(InputOutputMultiTower, DiagonalFB): method __init__ (line 744) | def __init__(self, layer_collection, broadcast_dims_scale, method instantiate_factors (line 763) | def instantiate_factors(self, grads_list, damping): class KroneckerProductFB (line 775) | class KroneckerProductFB(FisherBlock): method _setup_damping (line 782) | def _setup_damping(self, damping, normalization=None): method register_matpower (line 818) | def register_matpower(self, exp): method register_cholesky (line 822) | def register_cholesky(self): method register_cholesky_inverse (line 826) | def register_cholesky_inverse(self): method damping (line 831) | def damping(self): method input_factor (line 843) | def input_factor(self): method output_factor (line 847) | def output_factor(self): method _renorm_coeff (line 851) | def _renorm_coeff(self): method _multiply_factored_matrix (line 862) | def _multiply_factored_matrix(self, left_factor, right_factor, vector, method multiply_matpower (line 875) | def multiply_matpower(self, vector, exp): method multiply_cholesky (line 884) | def multiply_cholesky(self, vector, transpose=False): method multiply_cholesky_inverse (line 893) | def multiply_cholesky_inverse(self, vector, transpose=False): method full_fisher_block (line 904) | def full_fisher_block(self): class FullyConnectedKFACBasicFB (line 918) | class FullyConnectedKFACBasicFB(InputOutputMultiTower, KroneckerProductFB): method __init__ (line 925) | def __init__(self, layer_collection, has_bias=False, method instantiate_factors (line 946) | def instantiate_factors(self, grads_list, damping): class ConvKFCBasicFB (line 979) | class ConvKFCBasicFB(InputOutputMultiTower, KroneckerProductFB): method __init__ (line 1003) | def __init__(self, method instantiate_factors (line 1063) | def instantiate_factors(self, grads_list, damping): method _renorm_coeff (line 1090) | def _renorm_coeff(self): class DepthwiseConvDiagonalFB (line 1094) | class DepthwiseConvDiagonalFB(ConvDiagonalFB): method __init__ (line 1100) | def __init__(self, method _multiply_matrix (line 1156) | def _multiply_matrix(self, matrix, vector): class DepthwiseConvKFCBasicFB (line 1163) | class DepthwiseConvKFCBasicFB(ConvKFCBasicFB): method __init__ (line 1169) | def __init__(self, method _multiply_factored_matrix (line 1226) | def _multiply_factored_matrix(self, left_factor, right_factor, vector, function depthwise_conv2d_filter_to_conv2d_filter (line 1237) | def depthwise_conv2d_filter_to_conv2d_filter(filter, name=None): # pyli... function conv2d_filter_to_depthwise_conv2d_filter (line 1280) | def conv2d_filter_to_depthwise_conv2d_filter(filter, name=None): # pyli... function maybe_tuple (line 1324) | def maybe_tuple(obj): class InputOutputMultiTowerMultiUse (line 1330) | class InputOutputMultiTowerMultiUse(InputOutputMultiTower): method __init__ (line 1333) | def __init__(self, num_uses=None, *args, **kwargs): method _process_data (line 1337) | def _process_data(self, grads_list): class FullyConnectedMultiIndepFB (line 1487) | class FullyConnectedMultiIndepFB(InputOutputMultiTowerMultiUse, method __init__ (line 1496) | def __init__(self, layer_collection, has_bias=False, num_uses=None, method instantiate_factors (line 1522) | def instantiate_factors(self, grads_list, damping): method _renorm_coeff (line 1546) | def _renorm_coeff(self): class ConvKFCBasicMultiIndepFB (line 1550) | class ConvKFCBasicMultiIndepFB(InputOutputMultiTowerMultiUse, method __init__ (line 1560) | def __init__(self, method instantiate_factors (line 1607) | def instantiate_factors(self, grads_list, damping): method _renorm_coeff (line 1629) | def _renorm_coeff(self): class SeriesFBApproximation (line 1633) | class SeriesFBApproximation(object): class FullyConnectedSeriesFB (line 1639) | class FullyConnectedSeriesFB(InputOutputMultiTowerMultiUse, method __init__ (line 1653) | def __init__(self, method _num_timesteps (line 1684) | def _num_timesteps(self): method _renorm_coeff (line 1688) | def _renorm_coeff(self): method instantiate_factors (line 1693) | def instantiate_factors(self, grads_list, damping): method register_matpower (line 1707) | def register_matpower(self, exp): method multiply_matpower (line 1723) | def multiply_matpower(self, vector, exp): method multiply_cholesky (line 1836) | def multiply_cholesky(self, vector): method multiply_cholesky_inverse (line 1840) | def multiply_cholesky_inverse(self, vector): FILE: kfac/python/ops/fisher_factors.py function set_global_constants (line 127) | def set_global_constants(init_covariances_at_zero=None, function maybe_place_on_device (line 211) | def maybe_place_on_device(device): function compute_cov (line 219) | def compute_cov(tensor, tensor_right=None, normalizer=None): function append_homog (line 247) | def append_homog(tensor, homog_value=None): function scope_string_from_params (line 272) | def scope_string_from_params(params): function scope_string_from_name (line 316) | def scope_string_from_name(tensor): function scalar_or_tensor_to_string (line 325) | def scalar_or_tensor_to_string(val): function list_to_string (line 329) | def list_to_string(lst): function graph_func_to_id (line 334) | def graph_func_to_id(func): function graph_func_to_string (line 340) | def graph_func_to_string(func): function _subsample_patches (line 345) | def _subsample_patches(patches, name=None): function _random_tensor_gather (line 390) | def _random_tensor_gather(array, num_ind, name=None): class FisherFactor (line 412) | class FisherFactor(object): method __init__ (line 429) | def __init__(self): method _var_scope (line 435) | def _var_scope(self): method name (line 444) | def name(self): method _cov_shape (line 448) | def _cov_shape(self): method _num_sources (line 453) | def _num_sources(self): method _num_towers (line 465) | def _num_towers(self): method _dtype (line 469) | def _dtype(self): method _partial_batch_size (line 474) | def _partial_batch_size(self, source=0, tower=0): method batch_size (line 478) | def batch_size(self, source=0): method check_partial_batch_sizes (line 483) | def check_partial_batch_sizes(self): method _cov_initializer (line 529) | def _cov_initializer(self): method instantiate_cov_variables (line 533) | def instantiate_cov_variables(self): method _compute_new_cov (line 545) | def _compute_new_cov(self, source, tower): method _compute_total_new_cov (line 559) | def _compute_total_new_cov(self): method make_covariance_update_op (line 585) | def make_covariance_update_op(self, ema_decay, ema_weight): method _get_data_device (line 604) | def _get_data_device(self, tower): method instantiate_inv_variables (line 608) | def instantiate_inv_variables(self): method make_inverse_update_ops (line 613) | def make_inverse_update_ops(self): method cov (line 618) | def cov(self): method get_cov_vars (line 621) | def get_cov_vars(self): method get_inv_vars (line 624) | def get_inv_vars(self): method get_cov_as_linear_operator (line 628) | def get_cov_as_linear_operator(self): method register_matpower (line 633) | def register_matpower(self, exp, damping_func): method register_cholesky (line 637) | def register_cholesky(self, damping_func): method register_cholesky_inverse (line 641) | def register_cholesky_inverse(self, damping_func): method get_matpower (line 645) | def get_matpower(self, exp, damping_func): method get_cholesky (line 649) | def get_cholesky(self, damping_func): method get_cholesky_inverse (line 653) | def get_cholesky_inverse(self, damping_func): class DenseSquareMatrixFactor (line 657) | class DenseSquareMatrixFactor(FisherFactor): method __init__ (line 674) | def __init__(self): method get_cov_as_linear_operator (line 688) | def get_cov_as_linear_operator(self): method _register_damping (line 695) | def _register_damping(self, damping_func): method register_inverse (line 701) | def register_inverse(self, damping_func): method register_matpower (line 705) | def register_matpower(self, exp, damping_func): method register_cholesky (line 725) | def register_cholesky(self, damping_func): method register_cholesky_inverse (line 741) | def register_cholesky_inverse(self, damping_func): method get_inv_vars (line 757) | def get_inv_vars(self): method instantiate_inv_variables (line 764) | def instantiate_inv_variables(self): method make_inverse_update_ops (line 810) | def make_inverse_update_ops(self): method get_inverse (line 882) | def get_inverse(self, damping_func): method get_matpower (line 886) | def get_matpower(self, exp, damping_func): method get_cholesky (line 905) | def get_cholesky(self, damping_func): method get_cholesky_inverse (line 916) | def get_cholesky_inverse(self, damping_func): method get_eigendecomp (line 927) | def get_eigendecomp(self): class NaiveFullFactor (line 944) | class NaiveFullFactor(DenseSquareMatrixFactor): method __init__ (line 951) | def __init__(self, method _var_scope (line 960) | def _var_scope(self): method _cov_shape (line 965) | def _cov_shape(self): method _num_sources (line 971) | def _num_sources(self): method _num_towers (line 975) | def _num_towers(self): method _dtype (line 979) | def _dtype(self): method _partial_batch_size (line 982) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 986) | def _compute_new_cov(self, source, tower): method _get_data_device (line 994) | def _get_data_device(self, tower): class DiagonalFactor (line 999) | class DiagonalFactor(FisherFactor): method get_cov_as_linear_operator (line 1006) | def get_cov_as_linear_operator(self): method _cov_initializer (line 1013) | def _cov_initializer(self): method _matrix_diagonal (line 1017) | def _matrix_diagonal(self): method make_inverse_update_ops (line 1020) | def make_inverse_update_ops(self): method instantiate_inv_variables (line 1023) | def instantiate_inv_variables(self): method register_matpower (line 1026) | def register_matpower(self, exp, damping_func): method register_cholesky (line 1029) | def register_cholesky(self, damping_func): method register_cholesky_inverse (line 1032) | def register_cholesky_inverse(self, damping_func): method get_matpower (line 1035) | def get_matpower(self, exp, damping_func): method get_cholesky (line 1044) | def get_cholesky(self, damping_func): method get_cholesky_inverse (line 1047) | def get_cholesky_inverse(self, damping_func): class NaiveDiagonalFactor (line 1051) | class NaiveDiagonalFactor(DiagonalFactor): method __init__ (line 1058) | def __init__(self, method _var_scope (line 1074) | def _var_scope(self): method _cov_shape (line 1079) | def _cov_shape(self): method _num_sources (line 1083) | def _num_sources(self): method _num_towers (line 1087) | def _num_towers(self): method _dtype (line 1091) | def _dtype(self): method _partial_batch_size (line 1094) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 1098) | def _compute_new_cov(self, source, tower): method _get_data_device (line 1103) | def _get_data_device(self, tower): class DiagonalKroneckerFactor (line 1107) | class DiagonalKroneckerFactor(DiagonalFactor): method __init__ (line 1128) | def __init__(self, tensors, has_bias=False, dtype=None): method _var_scope (line 1157) | def _var_scope(self): method _cov_shape (line 1162) | def _cov_shape(self): method _num_sources (line 1170) | def _num_sources(self): method _num_towers (line 1174) | def _num_towers(self): method _dtype (line 1178) | def _dtype(self): method _partial_batch_size (line 1181) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 1184) | def _compute_new_cov(self, source, tower): method _compute_new_cov_from_tensor (line 1187) | def _compute_new_cov_from_tensor(self, tensor): method _get_data_device (line 1226) | def _get_data_device(self, tower): class DiagonalMultiKF (line 1230) | class DiagonalMultiKF(DiagonalKroneckerFactor): method __init__ (line 1232) | def __init__(self, tensors, num_uses, has_bias=False, dtype=None): method _partial_batch_size (line 1237) | def _partial_batch_size(self, source=0, tower=0): method _cov_shape (line 1257) | def _cov_shape(self): method _compute_new_cov (line 1268) | def _compute_new_cov(self, source, tower): class FullyConnectedDiagonalFactor (line 1280) | class FullyConnectedDiagonalFactor(DiagonalFactor): method __init__ (line 1291) | def __init__(self, method _var_scope (line 1314) | def _var_scope(self): method _cov_shape (line 1319) | def _cov_shape(self): method _num_sources (line 1325) | def _num_sources(self): method _num_towers (line 1329) | def _num_towers(self): method _dtype (line 1333) | def _dtype(self): method _partial_batch_size (line 1336) | def _partial_batch_size(self, source=0, tower=0): method make_covariance_update_op (line 1339) | def make_covariance_update_op(self, ema_decay, ema_weight): method _compute_new_cov (line 1353) | def _compute_new_cov(self, source, tower): method _get_data_device (line 1367) | def _get_data_device(self, tower): class ScaleAndShiftFactor (line 1372) | class ScaleAndShiftFactor(FisherFactor): method __init__ (line 1374) | def __init__(self, method _var_scope (line 1396) | def _var_scope(self): method _cov_shape (line 1402) | def _cov_shape(self): method _num_sources (line 1423) | def _num_sources(self): method _num_towers (line 1427) | def _num_towers(self): method _dtype (line 1431) | def _dtype(self): method _partial_batch_size (line 1434) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 1437) | def _compute_new_cov(self, source, tower): method _get_data_device (line 1478) | def _get_data_device(self, tower): class ScaleAndShiftFullFactor (line 1482) | class ScaleAndShiftFullFactor(ScaleAndShiftFactor, DenseSquareMatrixFact... method __init__ (line 1484) | def __init__(self, class ScaleAndShiftDiagonalFactor (line 1500) | class ScaleAndShiftDiagonalFactor(ScaleAndShiftFactor, DiagonalFactor): method __init__ (line 1502) | def __init__(self, class ConvDiagonalFactor (line 1518) | class ConvDiagonalFactor(DiagonalFactor): method __init__ (line 1521) | def __init__(self, method _var_scope (line 1592) | def _var_scope(self): method _cov_shape (line 1597) | def _cov_shape(self): method _num_sources (line 1605) | def _num_sources(self): method _num_towers (line 1609) | def _num_towers(self): method _dtype (line 1613) | def _dtype(self): method _partial_batch_size (line 1616) | def _partial_batch_size(self, source=0, tower=0): method make_covariance_update_op (line 1619) | def make_covariance_update_op(self, ema_decay, ema_weight): method _compute_new_cov (line 1652) | def _compute_new_cov(self, source, tower): method _convdiag_sum_of_squares (line 1663) | def _convdiag_sum_of_squares(self, patches, outputs_grad): method _get_data_device (line 1670) | def _get_data_device(self, tower): class FullyConnectedKroneckerFactor (line 1674) | class FullyConnectedKroneckerFactor(DenseSquareMatrixFactor): method __init__ (line 1678) | def __init__(self, method _var_scope (line 1704) | def _var_scope(self): method _cov_shape (line 1709) | def _cov_shape(self): method _num_sources (line 1714) | def _num_sources(self): method _num_towers (line 1718) | def _num_towers(self): method _dtype (line 1722) | def _dtype(self): method _partial_batch_size (line 1725) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 1728) | def _compute_new_cov(self, source, tower): method _get_data_device (line 1734) | def _get_data_device(self, tower): class ConvInputKroneckerFactor (line 1738) | class ConvInputKroneckerFactor(DenseSquareMatrixFactor): method __init__ (line 1750) | def __init__(self, method _var_scope (line 1814) | def _var_scope(self): method _cov_shape (line 1822) | def _cov_shape(self): method _num_sources (line 1829) | def _num_sources(self): method _num_towers (line 1833) | def _num_towers(self): method _dtype (line 1837) | def _dtype(self): method _partial_batch_size (line 1840) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 1844) | def _compute_new_cov(self, source, tower): method _get_data_device (line 1936) | def _get_data_device(self, tower): class ConvInputMultiKF (line 1940) | class ConvInputMultiKF(ConvInputKroneckerFactor): method __init__ (line 1942) | def __init__(self, method _partial_batch_size (line 1969) | def _partial_batch_size(self, source=0, tower=0): class ConvInputSUAKroneckerFactor (line 1979) | class ConvInputSUAKroneckerFactor(FisherFactor): method __init__ (line 1988) | def __init__(self, inputs, filter_shape, has_bias=False): method _var_scope (line 2021) | def _var_scope(self): method _cov_shape (line 2026) | def _cov_shape(self): method _num_sources (line 2039) | def _num_sources(self): method _num_towers (line 2043) | def _num_towers(self): method _dtype (line 2047) | def _dtype(self): method mu (line 2051) | def mu(self): method _partial_batch_size (line 2054) | def _partial_batch_size(self, source=0, tower=0): method _register_damping (line 2058) | def _register_damping(self, damping_func): method get_inv_vars (line 2064) | def get_inv_vars(self): method instantiate_cov_variables (line 2069) | def instantiate_cov_variables(self): method make_covariance_update_op (line 2087) | def make_covariance_update_op(self, ema_decay, ema_weight): method _compute_new_cov (line 2124) | def _compute_new_cov(self, source, tower): method register_matpower (line 2135) | def register_matpower(self, exp, damping_func): method _compute_sm_rank_one_update_quants (line 2159) | def _compute_sm_rank_one_update_quants(self, exp, damping_id, damping_... method get_matpower (line 2173) | def get_matpower(self, exp, damping_func): method make_inverse_update_ops (line 2256) | def make_inverse_update_ops(self): method get_inverse (line 2288) | def get_inverse(self, damping_func): method instantiate_inv_variables (line 2292) | def instantiate_inv_variables(self): method _make_cov_linear_operator (line 2340) | def _make_cov_linear_operator(self, damping=None): method get_cov_as_linear_operator (line 2385) | def get_cov_as_linear_operator(self): method get_cholesky (line 2388) | def get_cholesky(self, damping_func): method get_cholesky_inverse (line 2392) | def get_cholesky_inverse(self, damping_func): method register_cholesky (line 2396) | def register_cholesky(self): method register_cholesky_inverse (line 2400) | def register_cholesky_inverse(self): method _get_data_device (line 2404) | def _get_data_device(self, tower): class ConvOutputKroneckerFactor (line 2408) | class ConvOutputKroneckerFactor(DenseSquareMatrixFactor): method __init__ (line 2419) | def __init__(self, outputs_grads, data_format=None): method _var_scope (line 2438) | def _var_scope(self): method _cov_shape (line 2443) | def _cov_shape(self): method _num_sources (line 2448) | def _num_sources(self): method _num_towers (line 2452) | def _num_towers(self): method _dtype (line 2456) | def _dtype(self): method _partial_batch_size (line 2459) | def _partial_batch_size(self, source=0, tower=0): method _compute_new_cov (line 2462) | def _compute_new_cov(self, source, tower): method _get_data_device (line 2476) | def _get_data_device(self, tower): class ConvOutputMultiKF (line 2480) | class ConvOutputMultiKF(ConvOutputKroneckerFactor): method __init__ (line 2482) | def __init__(self, outputs_grads, num_uses, data_format=None): method _partial_batch_size (line 2487) | def _partial_batch_size(self, source=0, tower=0): class FullyConnectedMultiKF (line 2497) | class FullyConnectedMultiKF(FullyConnectedKroneckerFactor): method __init__ (line 2500) | def __init__(self, method _num_timesteps (line 2530) | def _num_timesteps(self): method _partial_batch_size (line 2533) | def _partial_batch_size(self, source=0, tower=0): method _var_scope (line 2542) | def _var_scope(self): method get_inv_vars (line 2547) | def get_inv_vars(self): method make_covariance_update_op (line 2553) | def make_covariance_update_op(self, ema_decay, ema_weight): method _compute_new_cov (line 2582) | def _compute_new_cov(self, source, tower): method _compute_new_cov_dt1 (line 2591) | def _compute_new_cov_dt1(self, source, tower): # pylint: disable=miss... method _cov_shape (line 2614) | def _cov_shape(self): method _get_data_device (line 2622) | def _get_data_device(self, tower): method _vec_shape (line 2626) | def _vec_shape(self): method get_option1quants (line 2630) | def get_option1quants(self, damping_func): method get_option2quants (line 2634) | def get_option2quants(self, damping_func): method cov_dt1 (line 2639) | def cov_dt1(self): method get_cov_vars (line 2643) | def get_cov_vars(self): method register_cov_dt1 (line 2649) | def register_cov_dt1(self): method instantiate_cov_variables (line 2652) | def instantiate_cov_variables(self): method register_option1quants (line 2664) | def register_option1quants(self, damping_func): method register_option2quants (line 2669) | def register_option2quants(self, damping_func): method instantiate_inv_variables (line 2674) | def instantiate_inv_variables(self): method make_inverse_update_ops (line 2734) | def make_inverse_update_ops(self): FILE: kfac/python/ops/kfac_utils/async_inv_cov_update_kfac_opt.py class AsyncInvCovUpdateKfacOpt (line 30) | class AsyncInvCovUpdateKfacOpt(optimizer.KfacOptimizer): method __init__ (line 49) | def __init__(self, method _make_ops (line 80) | def _make_ops(self, update_thunks): method apply_gradients (line 83) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method run_cov_inv_ops (line 94) | def run_cov_inv_ops(self, sess): method _run_ops (line 105) | def _run_ops(self, sess): method stop_cov_inv_ops (line 120) | def stop_cov_inv_ops(self, sess): method _set_up_op_name_queue (line 125) | def _set_up_op_name_queue(self, ops_to_run): FILE: kfac/python/ops/kfac_utils/data_reader.py function _slice_data (line 30) | def _slice_data(stored_data, size): class VariableBatchReader (line 34) | class VariableBatchReader(object): method __init__ (line 37) | def __init__(self, dataset, max_batch_size): method __call__ (line 52) | def __call__(self, batch_size): class CachedDataReader (line 72) | class CachedDataReader(VariableBatchReader): method __init__ (line 75) | def __init__(self, dataset, max_batch_size): method __call__ (line 104) | def __call__(self, batch_size): method cached_batch (line 128) | def cached_batch(self): FILE: kfac/python/ops/kfac_utils/data_reader_alt.py function _extract_data (line 34) | def _extract_data(tensor_list, indices): class VariableBatchReader (line 38) | class VariableBatchReader(object): method __init__ (line 41) | def __init__(self, dataset, num_examples): method __call__ (line 54) | def __call__(self, batch_size): class CachedDataReader (line 76) | class CachedDataReader(VariableBatchReader): method __init__ (line 79) | def __init__(self, dataset, num_examples): method __call__ (line 105) | def __call__(self, batch_size): method cached_batch (line 126) | def cached_batch(self): FILE: kfac/python/ops/kfac_utils/periodic_inv_cov_update_kfac_opt.py class PeriodicInvCovUpdateKfacOpt (line 31) | class PeriodicInvCovUpdateKfacOpt(optimizer.KfacOptimizer): method __init__ (line 52) | def __init__(self, method minimize (line 123) | def minimize(self, method apply_gradients (line 170) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method kfac_update_ops (line 177) | def kfac_update_ops(self): FILE: kfac/python/ops/layer_collection.py function get_default_layer_collection (line 107) | def get_default_layer_collection(): function set_default_layer_collection (line 117) | def set_default_layer_collection(layer_collection): class LayerParametersDict (line 126) | class LayerParametersDict(OrderedDict): method __init__ (line 132) | def __init__(self, *args, **kwargs): method __setitem__ (line 136) | def __setitem__(self, key, value): method __delitem__ (line 145) | def __delitem__(self, key): method __getitem__ (line 150) | def __getitem__(self, key): method __contains__ (line 154) | def __contains__(self, key): method _canonicalize_key (line 158) | def _canonicalize_key(self, key): class LayerCollection (line 168) | class LayerCollection(object): method __init__ (line 194) | def __init__(self, method losses (line 276) | def losses(self): method towers_by_loss (line 281) | def towers_by_loss(self): method registered_variables (line 286) | def registered_variables(self): method linked_parameters (line 294) | def linked_parameters(self): method default_generic_approximation (line 308) | def default_generic_approximation(self): method set_default_generic_approximation (line 311) | def set_default_generic_approximation(self, value): method default_fully_connected_approximation (line 319) | def default_fully_connected_approximation(self): method set_default_fully_connected_approximation (line 322) | def set_default_fully_connected_approximation(self, value): method default_conv2d_approximation (line 330) | def default_conv2d_approximation(self): method set_default_conv2d_approximation (line 333) | def set_default_conv2d_approximation(self, value): method default_fully_connected_multi_approximation (line 341) | def default_fully_connected_multi_approximation(self): method set_default_fully_connected_multi_approximation (line 344) | def set_default_fully_connected_multi_approximation(self, value): method default_conv2d_multi_approximation (line 351) | def default_conv2d_multi_approximation(self): method set_default_conv2d_multi_approximation (line 354) | def set_default_conv2d_multi_approximation(self, value): method default_scale_and_shift_approximation (line 361) | def default_scale_and_shift_approximation(self): method set_default_scale_and_shift_approximation (line 364) | def set_default_scale_and_shift_approximation(self, value): method auto_register_layers (line 370) | def auto_register_layers(self, var_list=None, batch_size=None): method finalize (line 411) | def finalize(self): method _register_block (line 421) | def _register_block(self, layer_key, fisher_block, reuse=VARIABLE_SCOPE): method _register_loss_function (line 496) | def _register_loss_function(self, method _get_use_count_map (line 567) | def _get_use_count_map(self): method _add_uses (line 571) | def _add_uses(self, params, uses): method check_registration (line 582) | def check_registration(self, variables): method get_blocks (line 626) | def get_blocks(self): method get_factors (line 629) | def get_factors(self): method graph (line 633) | def graph(self): method subgraph (line 637) | def subgraph(self): method define_linked_parameters (line 640) | def define_linked_parameters(self, params, approximation=None): method _create_subgraph (line 686) | def _create_subgraph(self): method eval_losses (line 692) | def eval_losses(self, target_mode="data", coeff_mode="regular"): method total_loss (line 716) | def total_loss(self, coeff_mode="regular"): method total_sampled_loss (line 720) | def total_sampled_loss(self, coeff_mode="regular"): method _get_linked_approx (line 724) | def _get_linked_approx(self, params): method _get_block_type (line 732) | def _get_block_type(self, params, approx, default, approx_to_type): method register_fully_connected (line 743) | def register_fully_connected(self, method register_conv1d (line 796) | def register_conv1d(self, method register_conv2d (line 857) | def register_conv2d(self, method register_convolution (line 966) | def register_convolution(self, method register_depthwise_conv2d (line 1027) | def register_depthwise_conv2d(self, method register_separable_conv2d (line 1086) | def register_separable_conv2d(self, method register_generic (line 1159) | def register_generic(self, method register_fully_connected_multi (line 1200) | def register_fully_connected_multi(self, params, inputs, outputs, method register_conv2d_multi (line 1291) | def register_conv2d_multi(self, method register_scale_and_shift (line 1379) | def register_scale_and_shift(self, method register_categorical_predictive_distribution (line 1489) | def register_categorical_predictive_distribution(self, method register_softmax_cross_entropy_loss (line 1532) | def register_softmax_cross_entropy_loss(self, method register_normal_predictive_distribution (line 1573) | def register_normal_predictive_distribution(self, method register_squared_error_loss (line 1618) | def register_squared_error_loss(self, method register_multi_bernoulli_predictive_distribution (line 1657) | def register_multi_bernoulli_predictive_distribution(self, method register_sigmoid_cross_entropy_loss (line 1701) | def register_sigmoid_cross_entropy_loss(self, method make_or_get_factor (line 1741) | def make_or_get_factor(self, cls, args): method as_default (line 1773) | def as_default(self): FILE: kfac/python/ops/linear_operator.py class LinearOperatorExtras (line 29) | class LinearOperatorExtras(object): # pylint: disable=missing-docstring method matmul (line 31) | def matmul(self, x, adjoint=False, adjoint_arg=False, name="matmul"): ... method matmul_right (line 47) | def matmul_right(self, x, adjoint=False, adjoint_arg=False, name="matm... class LinearOperatorFullMatrix (line 66) | class LinearOperatorFullMatrix(LinearOperatorExtras, # pylint: disable=... method _matmul_right (line 69) | def _matmul_right(self, x, adjoint=False, adjoint_arg=False): method _matmul_sparse (line 73) | def _matmul_sparse(self, x, adjoint=False, adjoint_arg=False): method _matmul_right_sparse (line 76) | def _matmul_right_sparse(self, x, adjoint=False, adjoint_arg=False): class LinearOperatorDiag (line 81) | class LinearOperatorDiag(LinearOperatorExtras, # pylint: disable=missin... method _matmul_right (line 84) | def _matmul_right(self, x, adjoint=False, adjoint_arg=False): method _matmul_sparse (line 89) | def _matmul_sparse(self, x, adjoint=False, adjoint_arg=False): method _matmul_right_sparse (line 94) | def _matmul_right_sparse(self, x, adjoint=False, adjoint_arg=False): FILE: kfac/python/ops/loss_functions.py class LossFunction (line 30) | class LossFunction(object): method targets (line 42) | def targets(self): method inputs (line 51) | def inputs(self): method evaluate (line 55) | def evaluate(self): method _evaluate (line 65) | def _evaluate(self, targets): method multiply_ggn (line 77) | def multiply_ggn(self, vector): method multiply_ggn_factor (line 94) | def multiply_ggn_factor(self, vector): method multiply_ggn_factor_transpose (line 116) | def multiply_ggn_factor_transpose(self, vector): method multiply_ggn_factor_replicated_one_hot (line 138) | def multiply_ggn_factor_replicated_one_hot(self, index): method ggn_factor_inner_shape (line 165) | def ggn_factor_inner_shape(self): method ggn_factor_inner_static_shape (line 170) | def ggn_factor_inner_static_shape(self): method dtype (line 175) | def dtype(self): class NegativeLogProbLoss (line 182) | class NegativeLogProbLoss(LossFunction): method __init__ (line 185) | def __init__(self, seed=None): method inputs (line 190) | def inputs(self): method params (line 194) | def params(self): method multiply_fisher (line 199) | def multiply_fisher(self, vector): method multiply_fisher_factor (line 213) | def multiply_fisher_factor(self, vector): method multiply_fisher_factor_transpose (line 237) | def multiply_fisher_factor_transpose(self, vector): method multiply_fisher_factor_replicated_one_hot (line 261) | def multiply_fisher_factor_replicated_one_hot(self, index): method fisher_factor_inner_shape (line 290) | def fisher_factor_inner_shape(self): method fisher_factor_inner_static_shape (line 295) | def fisher_factor_inner_static_shape(self): method sample (line 300) | def sample(self, seed): method evaluate_on_sample (line 304) | def evaluate_on_sample(self, seed=None): class NaturalParamsNegativeLogProbLoss (line 320) | class NaturalParamsNegativeLogProbLoss(NegativeLogProbLoss): method multiply_ggn (line 331) | def multiply_ggn(self, vector): method multiply_ggn_factor (line 334) | def multiply_ggn_factor(self, vector): method multiply_ggn_factor_transpose (line 337) | def multiply_ggn_factor_transpose(self, vector): method multiply_ggn_factor_replicated_one_hot (line 340) | def multiply_ggn_factor_replicated_one_hot(self, index): method ggn_factor_inner_shape (line 344) | def ggn_factor_inner_shape(self): method ggn_factor_inner_static_shape (line 348) | def ggn_factor_inner_static_shape(self): class DistributionNegativeLogProbLoss (line 352) | class DistributionNegativeLogProbLoss(NegativeLogProbLoss): method __init__ (line 355) | def __init__(self, seed=None): method dist (line 359) | def dist(self): method _evaluate (line 363) | def _evaluate(self, targets): method sample (line 366) | def sample(self, seed): class NormalMeanNegativeLogProbLoss (line 370) | class NormalMeanNegativeLogProbLoss(DistributionNegativeLogProbLoss, method __init__ (line 384) | def __init__(self, mean, var=0.5, targets=None, seed=None): method targets (line 393) | def targets(self): method dist (line 397) | def dist(self): method params (line 401) | def params(self): method multiply_fisher (line 404) | def multiply_fisher(self, vector): method multiply_fisher_factor (line 407) | def multiply_fisher_factor(self, vector): method multiply_fisher_factor_transpose (line 410) | def multiply_fisher_factor_transpose(self, vector): method multiply_fisher_factor_replicated_one_hot (line 413) | def multiply_fisher_factor_replicated_one_hot(self, index): method fisher_factor_inner_shape (line 422) | def fisher_factor_inner_shape(self): method fisher_factor_inner_static_shape (line 426) | def fisher_factor_inner_static_shape(self): class NormalMeanVarianceNegativeLogProbLoss (line 430) | class NormalMeanVarianceNegativeLogProbLoss(DistributionNegativeLogProbL... method __init__ (line 448) | def __init__(self, mean, variance, targets=None, seed=None): method targets (line 457) | def targets(self): method dist (line 461) | def dist(self): method params (line 466) | def params(self): method _concat (line 469) | def _concat(self, mean, variance): method _split (line 472) | def _split(self, params): method _fisher_mean (line 476) | def _fisher_mean(self): method _fisher_mean_factor (line 480) | def _fisher_mean_factor(self): method _fisher_var (line 484) | def _fisher_var(self): method _fisher_var_factor (line 488) | def _fisher_var_factor(self): method multiply_fisher (line 491) | def multiply_fisher(self, vecs): method multiply_fisher_factor (line 495) | def multiply_fisher_factor(self, vecs): method multiply_fisher_factor_transpose (line 500) | def multiply_fisher_factor_transpose(self, vecs): method multiply_fisher_factor_replicated_one_hot (line 505) | def multiply_fisher_factor_replicated_one_hot(self, index): method fisher_factor_inner_shape (line 528) | def fisher_factor_inner_shape(self): method fisher_factor_inner_static_shape (line 533) | def fisher_factor_inner_static_shape(self): method multiply_ggn (line 537) | def multiply_ggn(self, vector): method multiply_ggn_factor (line 540) | def multiply_ggn_factor(self, vector): method multiply_ggn_factor_transpose (line 543) | def multiply_ggn_factor_transpose(self, vector): method multiply_ggn_factor_replicated_one_hot (line 546) | def multiply_ggn_factor_replicated_one_hot(self, index): method ggn_factor_inner_shape (line 550) | def ggn_factor_inner_shape(self): method ggn_factor_inner_static_shape (line 554) | def ggn_factor_inner_static_shape(self): class CategoricalLogitsNegativeLogProbLoss (line 558) | class CategoricalLogitsNegativeLogProbLoss(DistributionNegativeLogProbLoss, method __init__ (line 576) | def __init__(self, logits, targets=None, seed=None): method targets (line 591) | def targets(self): method dist (line 595) | def dist(self): method _probs (line 599) | def _probs(self): method _sqrt_probs (line 603) | def _sqrt_probs(self): method params (line 607) | def params(self): method multiply_fisher (line 610) | def multiply_fisher(self, vector): method multiply_fisher_factor (line 615) | def multiply_fisher_factor(self, vector): method multiply_fisher_factor_transpose (line 621) | def multiply_fisher_factor_transpose(self, vector): method multiply_fisher_factor_replicated_one_hot (line 627) | def multiply_fisher_factor_replicated_one_hot(self, index): method fisher_factor_inner_shape (line 637) | def fisher_factor_inner_shape(self): method fisher_factor_inner_static_shape (line 641) | def fisher_factor_inner_static_shape(self): class MultiBernoulliNegativeLogProbLoss (line 645) | class MultiBernoulliNegativeLogProbLoss(DistributionNegativeLogProbLoss, method __init__ (line 660) | def __init__(self, logits, targets=None, seed=None): method targets (line 666) | def targets(self): method dist (line 670) | def dist(self): method _probs (line 674) | def _probs(self): method params (line 678) | def params(self): method multiply_fisher (line 681) | def multiply_fisher(self, vector): method multiply_fisher_factor (line 684) | def multiply_fisher_factor(self, vector): method multiply_fisher_factor_transpose (line 687) | def multiply_fisher_factor_transpose(self, vector): method multiply_fisher_factor_replicated_one_hot (line 690) | def multiply_fisher_factor_replicated_one_hot(self, index): method fisher_factor_inner_shape (line 698) | def fisher_factor_inner_shape(self): method fisher_factor_inner_static_shape (line 702) | def fisher_factor_inner_static_shape(self): function insert_slice_in_zeros (line 706) | def insert_slice_in_zeros(slice_to_insert, dim, dim_size, position): class OnehotCategoricalLogitsNegativeLogProbLoss (line 741) | class OnehotCategoricalLogitsNegativeLogProbLoss( method dist (line 750) | def dist(self): FILE: kfac/python/ops/op_queue.py class OpQueue (line 25) | class OpQueue(object): method __init__ (line 34) | def __init__(self, ops, seed=None): method ops (line 52) | def ops(self): method next_op (line 56) | def next_op(self, sess): FILE: kfac/python/ops/optimizer.py function set_global_constants (line 41) | def set_global_constants(include_damping_in_qmodel_change=None): class KfacOptimizer (line 49) | class KfacOptimizer(tf.train.GradientDescentOptimizer): method __init__ (line 52) | def __init__(self, method get_cov_vars (line 422) | def get_cov_vars(self): method get_inv_vars (line 426) | def get_inv_vars(self): method factors (line 431) | def factors(self): method registered_variables (line 435) | def registered_variables(self): method layers (line 439) | def layers(self): method mat_type (line 443) | def mat_type(self): method damping (line 447) | def damping(self): method damping_adaptation_interval (line 454) | def damping_adaptation_interval(self): method learning_rate (line 458) | def learning_rate(self): method momentum (line 465) | def momentum(self): method rho (line 472) | def rho(self): method qmodel_change (line 476) | def qmodel_change(self): method counter (line 480) | def counter(self): method params_stats (line 484) | def params_stats(self): method set_loss (line 487) | def set_loss(self, loss): method _maybe_print_logging_info (line 493) | def _maybe_print_logging_info(self): method make_vars_and_create_op_thunks (line 509) | def make_vars_and_create_op_thunks(self): method create_ops_and_vars_thunks (line 521) | def create_ops_and_vars_thunks(self): method check_var_list (line 548) | def check_var_list(self, var_list): method _scale_loss (line 554) | def _scale_loss(loss_value): method minimize (line 563) | def minimize(self, method compute_gradients (line 598) | def compute_gradients(self, method _is_damping_adaptation_time (line 638) | def _is_damping_adaptation_time(self): method _is_just_after_damping_adaptation_time (line 647) | def _is_just_after_damping_adaptation_time(self): method _maybe_update_prev_loss (line 653) | def _maybe_update_prev_loss(self): method maybe_pre_update_adapt_damping (line 673) | def maybe_pre_update_adapt_damping(self): method _maybe_post_update_adapt_damping (line 704) | def _maybe_post_update_adapt_damping(self): method apply_gradients (line 716) | def apply_gradients(self, grads_and_vars, *args, **kwargs): method _add_weight_decay (line 771) | def _add_weight_decay(self, grads_and_vars): method _squared_fisher_norm (line 783) | def _squared_fisher_norm(self, grads_and_vars, precon_grads_and_vars): method _update_clip_coeff (line 805) | def _update_clip_coeff(self, grads_and_vars, precon_grads_and_vars): method _clip_updates (line 837) | def _clip_updates(self, grads_and_vars, precon_grads_and_vars): method _compute_prev_updates (line 859) | def _compute_prev_updates(self, variables): method _compute_qmodel (line 887) | def _compute_qmodel(self, method _sub_damping_out_qmodel_change_coeff (line 976) | def _sub_damping_out_qmodel_change_coeff(self): method _compute_qmodel_hyperparams (line 979) | def _compute_qmodel_hyperparams(self, m, c, b, fixed_mu=None): method _compute_approx_qmodel_change (line 1106) | def _compute_approx_qmodel_change(self, updates_and_vars, grads_and_va... method _maybe_update_qmodel_change (line 1132) | def _maybe_update_qmodel_change(self, qmodel_change_thunk): method _multiply_preconditioner (line 1155) | def _multiply_preconditioner(self, vecs_and_vars): method _get_qmodel_quantities (line 1158) | def _get_qmodel_quantities(self, grads_and_vars): method _compute_raw_update_steps (line 1175) | def _compute_raw_update_steps(self, grads_and_vars): method _update_velocities (line 1290) | def _update_velocities(self, vecs_and_vars, decay, vec_coeff=1.0): method _get_current_loss (line 1317) | def _get_current_loss(self): method _get_prev_loss (line 1323) | def _get_prev_loss(self): method _update_damping (line 1326) | def _update_damping(self): function _two_by_two_solve (line 1367) | def _two_by_two_solve(m, vec): function _eval_quadratic_no_c (line 1389) | def _eval_quadratic_no_c(m, vec): function _eval_quadratic (line 1393) | def _eval_quadratic(m, c, vec): FILE: kfac/python/ops/placement.py function _make_thunk_on_device (line 30) | def _make_thunk_on_device(func, device): class RoundRobinPlacementMixin (line 37) | class RoundRobinPlacementMixin(object): method __init__ (line 40) | def __init__(self, cov_devices=None, inv_devices=None, trans_devices=N... method _place_and_compute_transformation_thunks (line 62) | def _place_and_compute_transformation_thunks(self, thunks, params_list): method create_ops_and_vars_thunks (line 90) | def create_ops_and_vars_thunks(self, scope=None): class ReplicaRoundRobinPlacementMixin (line 169) | class ReplicaRoundRobinPlacementMixin(object): method __init__ (line 184) | def __init__(self, distribute_transformations=True, **kwargs): method _place_and_compute_transformation_thunks (line 205) | def _place_and_compute_transformation_thunks(self, thunks, params_list): method create_ops_and_vars_thunks (line 225) | def create_ops_and_vars_thunks(self, scope=None): FILE: kfac/python/ops/tensormatch/graph_matcher.py function _any (line 65) | def _any(itr): function _all (line 73) | def _all(itr): function is_seq (line 84) | def is_seq(obj): function is_nonempty_seq (line 88) | def is_nonempty_seq(obj): function is_empty_seq (line 92) | def is_empty_seq(obj): function is_element_pattern (line 102) | def is_element_pattern(pat): function element_name (line 106) | def element_name(pat): function element_restrictions (line 110) | def element_restrictions(pat): function is_choice_pattern (line 114) | def is_choice_pattern(pat): function choice_patterns (line 118) | def choice_patterns(pat): function is_list_pattern (line 122) | def is_list_pattern(pat): function list_patterns (line 126) | def list_patterns(pat): function is_not_pattern (line 130) | def is_not_pattern(pat): function negated_pattern (line 134) | def negated_pattern(pat): function is_any_pattern (line 138) | def is_any_pattern(pat): function is_any_noconsume_pattern (line 142) | def is_any_noconsume_pattern(pat): function is_internal_node_pattern (line 146) | def is_internal_node_pattern(pat): function internal_node_pattern (line 154) | def internal_node_pattern(pat): function internal_node_input_pattern (line 158) | def internal_node_input_pattern(pat): function internal_node_output_pattern (line 165) | def internal_node_output_pattern(pat): function internal_patterns (line 172) | def internal_patterns(pat): function match_eqv (line 180) | def match_eqv(pattern): function match_any (line 186) | def match_any(data, bindings, consumed, succeed): function match_any_noconsume (line 194) | def match_any_noconsume(data, bindings, consumed, succeed): # pylint: d... function match_element (line 201) | def match_element(variable_name, restrictions): function match_choice (line 215) | def match_choice(*match_combinators): function match_list (line 222) | def match_list(*match_combinators): function match_not (line 253) | def match_not(match_combinator): function match_internal (line 261) | def match_internal(*match_combinators): class PatternEvaluator (line 275) | class PatternEvaluator(object): method __init__ (line 278) | def __init__(self, default_operation=None): method defhandler (line 282) | def defhandler(self, predicate, handler): method __call__ (line 285) | def __call__(self, pat): function expand_thunks (line 320) | def expand_thunks(pat): function matcher (line 345) | def matcher(pattern): function all_matcher (line 352) | def all_matcher(pattern): function matcher_with_consumed (line 364) | def matcher_with_consumed(pattern): FILE: kfac/python/ops/tensormatch/graph_patterns.py function Op (line 29) | def Op(name=None): function Tensor (line 33) | def Tensor(name=None): function Variable (line 37) | def Variable(name=None): function Const (line 41) | def Const(name=None): function Placeholder (line 45) | def Placeholder(name=None): function BatchNorm (line 62) | def BatchNorm(in_pattern=Tensor('in'), function FusedBatchNormOutput (line 81) | def FusedBatchNormOutput(in_pattern=Tensor('in'), function ScaleAndShift (line 97) | def ScaleAndShift(in_pattern=Tensor('in'), function Affine (line 116) | def Affine(in_pattern=Tensor('in'), function Embed (line 133) | def Embed(in_pattern=Tensor('in'), function Layer (line 150) | def Layer(in_pattern=Tensor('in'), **kwargs): function LayerWithBatchNorm (line 157) | def LayerWithBatchNorm(in_pattern=Tensor('in')): FILE: kfac/python/ops/tensormatch/graph_search.py class RecordType (line 30) | class RecordType(enum.Enum): class AmbiguousRegistrationError (line 37) | class AmbiguousRegistrationError(Exception): class MatchRecord (line 41) | class MatchRecord(object): method __init__ (line 44) | def __init__(self, record_type, params, tensor_set, data=None): function ensure_sequence (line 63) | def ensure_sequence(obj): function record_affine_from_bindings (line 71) | def record_affine_from_bindings(bindings, consumed_tensors, function record_scale_and_shift_from_bindings (line 161) | def record_scale_and_shift_from_bindings(bindings, consumed_tensors, function record_batch_norm_from_bindings (line 204) | def record_batch_norm_from_bindings(bindings, consumed_tensors, function register_layers (line 251) | def register_layers(layer_collection, varlist, batch_size=None): function register_subgraph_layers (line 330) | def register_subgraph_layers(layer_collection, function filter_user_registered_records (line 471) | def filter_user_registered_records(record_list_dict, user_registered_var... function filter_grouped_variable_records (line 482) | def filter_grouped_variable_records(layer_collection, record_list_dict): function filter_subgraph_records (line 496) | def filter_subgraph_records(record_list_dict): function filter_records (line 530) | def filter_records(layer_collection, record_list_dict, function register_records (line 580) | def register_records(layer_collection, FILE: kfac/python/ops/tensormatch/tensorflow_graph_util.py function is_op (line 35) | def is_op(node): function is_tensor (line 39) | def is_tensor(node): function is_var (line 47) | def is_var(node): function is_const (line 64) | def is_const(node): function is_placeholder (line 68) | def is_placeholder(node): function is_leaf (line 72) | def is_leaf(node): function is_identity (line 76) | def is_identity(node): function op_type_is (line 85) | def op_type_is(typename): function reduce_identity_ops (line 93) | def reduce_identity_ops(node): function expand_inputs (line 106) | def expand_inputs(node): function expand_outputs (line 120) | def expand_outputs(node): function make_op_pattern (line 131) | def make_op_pattern(typename): function import_ops_no_clobber (line 148) | def import_ops_no_clobber(dct, op_names): FILE: kfac/python/ops/utils.py function smart_assign (line 38) | def smart_assign(variable, value, assign_fn=tf.assign, function smart_cond (line 91) | def smart_cond(predicate, true_fn, false_fn, name=None): function set_global_constants (line 158) | def set_global_constants(posdef_inv_method=None, tf_replicator=None): class SequenceDict (line 169) | class SequenceDict(object): method __init__ (line 172) | def __init__(self, iterable=None): method __getitem__ (line 175) | def __getitem__(self, key_or_keys): method __setitem__ (line 181) | def __setitem__(self, key_or_keys, val_or_vals): method items (line 188) | def items(self): function tensors_to_column (line 192) | def tensors_to_column(tensors): function column_to_tensors (line 208) | def column_to_tensors(tensors_template, colvec): function kronecker_product (line 238) | def kronecker_product(mat1, mat2): function layer_params_to_mat2d (line 247) | def layer_params_to_mat2d(vector): function mat2d_to_layer_params (line 270) | def mat2d_to_layer_params(vector_template, mat2d): function posdef_inv (line 294) | def posdef_inv(tensor, damping): function posdef_inv_matrix_inverse (line 301) | def posdef_inv_matrix_inverse(tensor, identity, damping): function posdef_inv_cholesky (line 306) | def posdef_inv_cholesky(tensor, identity, damping): function posdef_inv_eig (line 312) | def posdef_inv_eig(tensor, identity, damping): function posdef_eig (line 325) | def posdef_eig(mat): function posdef_eig_svd (line 330) | def posdef_eig_svd(mat): function posdef_eig_self_adjoint (line 337) | def posdef_eig_self_adjoint(mat): function cholesky (line 351) | def cholesky(tensor, damping): class SubGraph (line 358) | class SubGraph(object): method __init__ (line 362) | def __init__(self, outputs): method _iter_add (line 369) | def _iter_add(self, root): method is_member (line 384) | def is_member(self, node): method variable_uses (line 388) | def variable_uses(self, var): method filter_list (line 431) | def filter_list(self, node_list): function preferred_int_dtype (line 440) | def preferred_int_dtype(): function generate_random_signs (line 449) | def generate_random_signs(shape, dtype=tf.float32): class MirroredVariableWrapper (line 463) | class MirroredVariableWrapper(object): method __init__ (line 465) | def __init__(self, var): method __getattr__ (line 468) | def __getattr__(self, name): function _as_list (line 481) | def _as_list(x): function fwd_gradients (line 485) | def fwd_gradients(ys, xs, grad_xs=None, stop_gradients=None, function get_tf_replicator (line 518) | def get_tf_replicator(): function is_tpu_replicated (line 522) | def is_tpu_replicated(): function is_replicated (line 531) | def is_replicated(): function get_num_replicas (line 538) | def get_num_replicas(): function get_replica_id (line 561) | def get_replica_id(): function all_sum (line 588) | def all_sum(structure, name=None): function all_average (line 624) | def all_average(structure, name=None): function map_gather (line 652) | def map_gather(thunks, name=None): function ensure_sequence (line 711) | def ensure_sequence(obj): function batch_execute (line 719) | def batch_execute(global_step, thunks, batch_size, name=None): function extract_convolution_patches (line 786) | def extract_convolution_patches(inputs, function extract_pointwise_conv2d_patches (line 858) | def extract_pointwise_conv2d_patches(inputs, function is_data_format_channel_last (line 904) | def is_data_format_channel_last(data_format): function matmul_sparse_dense (line 911) | def matmul_sparse_dense(A, B, name=None, transpose_a=False, transpose_b=... function matmul_diag_sparse (line 943) | def matmul_diag_sparse(A_diag, B, name=None): # pylint: disable=invalid... class AccumulatorVariable (line 969) | class AccumulatorVariable(object): method __init__ (line 977) | def __init__(self, name, shape, dtype): method accumulate (line 1007) | def accumulate(self, value): method value (line 1014) | def value(self): method read_value_and_reset (line 1018) | def read_value_and_reset(self): method reset (line 1025) | def reset(self): class PartitionedTensor (line 1035) | class PartitionedTensor(object): method __init__ (line 1038) | def __init__(self, tensors): method shape (line 1073) | def shape(self): method get_shape (line 1079) | def get_shape(self): method dtype (line 1083) | def dtype(self): method one_hot_depth (line 1087) | def one_hot_depth(self): method __str__ (line 1090) | def __str__(self): method __hash__ (line 1094) | def __hash__(self): method __eq__ (line 1097) | def __eq__(self, other): method __ne__ (line 1102) | def __ne__(self, other): method __getitem__ (line 1105) | def __getitem__(self, key): method as_tensor (line 1108) | def as_tensor(self, dtype=None, name=None, as_ref=False): method device (line 1115) | def device(self): function _check_match_lists_of_pairs (line 1133) | def _check_match_lists_of_pairs(list1, list2): function sprod (line 1140) | def sprod(scalar, list_): function sprod_p (line 1145) | def sprod_p(scalar, list_): function sum_ (line 1150) | def sum_(list1, list2): function sum_p (line 1155) | def sum_p(list1, list2): function ip (line 1162) | def ip(list1, list2): function ip_p (line 1168) | def ip_p(list1, list2): function assert_variables_match_pairs_list (line 1176) | def assert_variables_match_pairs_list(a_and_vars, function multiline_print (line 1208) | def multiline_print(lists): function get_shape (line 1226) | def get_shape(tensor): function cls_name (line 1238) | def cls_name(obj): function is_reference_variable (line 1242) | def is_reference_variable(x): class MovingAverageVariable (line 1248) | class MovingAverageVariable(object): method __init__ (line 1257) | def __init__(self, name, shape, dtype, initializer=tf.zeros_initialize... method dtype (line 1291) | def dtype(self): method value (line 1295) | def value(self): method add_to_average (line 1301) | def add_to_average(self, value, decay=1.0, weight=1.0): method reset (line 1322) | def reset(self): function num_conv_locations (line 1329) | def num_conv_locations(input_shape, filter_shape, strides, padding):