aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-02 13:37:26 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-02 13:41:37 -0700
commit9dce7b940562efb14d8bb06ac1db429343bf2c60 (patch)
tree7aab867832f772b7859e8f1eebefc6fff6bd938a
parent9a3af1dbb9749a5a509ddac129de4bb260f1a331 (diff)
Added mechanism to set global constants in utils.py similar to one for other files.
PiperOrigin-RevId: 174373317
-rw-r--r--tensorflow/contrib/kfac/python/ops/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/contrib/kfac/python/ops/utils.py b/tensorflow/contrib/kfac/python/ops/utils.py
index a7473481e4..0fd7f51477 100644
--- a/tensorflow/contrib/kfac/python/ops/utils.py
+++ b/tensorflow/contrib/kfac/python/ops/utils.py
@@ -33,6 +33,14 @@ from tensorflow.python.ops import random_ops
POSDEF_INV_METHOD = "cholesky"
+def set_global_constants(posdef_inv_method=None):
+ """Sets various global constants used by the classes in this module."""
+ global POSDEF_INV_METHOD
+
+ if posdef_inv_method is not None:
+ POSDEF_INV_METHOD = posdef_inv_method
+
+
class SequenceDict(object):
"""A dict convenience wrapper that allows getting/setting with sequences."""