From 417abb72affa0483d902b031c50a1112a4637282 Mon Sep 17 00:00:00 2001 From: Rohan Jain Date: Mon, 23 Nov 2020 13:27:08 -0800 Subject: [PATCH] Fixing up some minor doc nits for tf.lookup PiperOrigin-RevId: 343916994 Change-Id: I6cb893e41451b6d9927511575198bec5f8dd8919 --- tensorflow/python/ops/lookup_ops.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/ops/lookup_ops.py b/tensorflow/python/ops/lookup_ops.py index 145c2b0195c..63773ee0f95 100644 --- a/tensorflow/python/ops/lookup_ops.py +++ b/tensorflow/python/ops/lookup_ops.py @@ -458,7 +458,7 @@ class DatasetInitializer(TableInitializerBase): """ def __init__(self, dataset): - """Creates a table initializser from a `tf.data.Dataset`. + """Creates a table initializer from a `tf.data.Dataset`. Args: dataset: A `tf.data.Dataset` object that produces tuples of scalars. The @@ -633,8 +633,7 @@ class TextFileInitializer(TableInitializerBase): >>> init = tf.lookup.TextFileInitializer( ... filename=f.name, ... key_dtype=tf.string, key_index=tf.lookup.TextFileIndex.WHOLE_LINE, - ... value_dtype=tf.int64, value_index=tf.lookup.TextFileIndex.LINE_NUMBER, - ... delimiter=" ") + ... value_dtype=tf.int64, value_index=tf.lookup.TextFileIndex.LINE_NUMBER) >>> table = tf.lookup.StaticHashTable(init, -1) >>> table.lookup(tf.constant('palmer 30')).numpy() 2