aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/linear_optimizer
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-18 14:30:01 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-18 14:32:12 -0700
commit497dc60720669434a9e6cf7ff19be9ca6d526010 (patch)
tree0be68ddb12a821110037c5d6e3604f98af892b71 /tensorflow/contrib/linear_optimizer
parentd61b579f10d2a56b0f8616aa1fe18e7827e3afec (diff)
Allow turning off checkpointing for ShardedMutableDenseHashTable. Keep the checkpointing=True as the default.
PiperOrigin-RevId: 193417350
Diffstat (limited to 'tensorflow/contrib/linear_optimizer')
-rw-r--r--tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py b/tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
index ec726bbed4..5015fb0848 100644
--- a/tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
+++ b/tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
@@ -49,6 +49,7 @@ class ShardedMutableDenseHashTable(lookup.LookupInterface):
default_value,
empty_key,
num_shards=1,
+ checkpoint=True,
name='ShardedMutableHashTable'):
with ops.name_scope(name, 'sharded_mutable_hash_table') as scope:
super(ShardedMutableDenseHashTable, self).__init__(key_dtype,
@@ -61,6 +62,7 @@ class ShardedMutableDenseHashTable(lookup.LookupInterface):
value_dtype=value_dtype,
default_value=default_value,
empty_key=empty_key,
+ checkpoint=checkpoint,
name='%s-%d-of-%d' % (name, i + 1, num_shards)))
self._table_shards = table_shards
# TODO(andreasst): add a value_shape() method to LookupInterface