aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
authorGravatar Guillaume Klein <guillaume.klein4@gmail.com>2017-06-13 10:53:14 +0200
committerGravatar Martin Wicke <martin.wicke@gmail.com>2017-06-13 18:46:02 -0700
commit8ae96864e0f187f7a137c769f41950982e747e50 (patch)
tree00bc51544a6e70ac3037384a4c0f806e34ad76d8 /tensorflow
parentb36831e6e4de09380a9dfd012a067472a46fd10b (diff)
Fix minor typos in lookup_ops code samples.
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/contrib/lookup/lookup_ops.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/lookup/lookup_ops.py b/tensorflow/contrib/lookup/lookup_ops.py
index d5d413c56a..f0f1c14fca 100644
--- a/tensorflow/contrib/lookup/lookup_ops.py
+++ b/tensorflow/contrib/lookup/lookup_ops.py
@@ -97,7 +97,7 @@ def index_table_from_tensor(mapping,
Sample Usages:
```python
- mapping_strings = t.constant(["emerson", "lake", "palmer"])
+ mapping_strings = tf.constant(["emerson", "lake", "palmer"])
table = tf.contrib.lookup.index_table_from_tensor(
mapping=mapping_strings, num_oov_buckets=1, default_value=-1)
features = tf.constant(["emerson", "lake", "and", "palmer"])
@@ -208,7 +208,7 @@ def index_to_string_table_from_tensor(mapping, default_value="UNK", name=None):
Sample Usages:
```python
- mapping_string = t.constant(["emerson", "lake", "palmer")
+ mapping_string = tf.constant(["emerson", "lake", "palmer"])
indices = tf.constant([1, 5], tf.int64)
table = tf.contrib.lookup.index_to_string_table_from_tensor(
mapping_string, default_value="UNKNOWN")
@@ -260,7 +260,7 @@ def index_to_string(tensor, mapping, default_value="UNK", name=None):
For example:
```python
- mapping_string = t.constant(["emerson", "lake", "palmer")
+ mapping_string = tf.constant(["emerson", "lake", "palmer"])
indices = tf.constant([1, 5], tf.int64)
values = tf.contrib.lookup.index_to_string(
indices, mapping=mapping_string, default_value="UNKNOWN")