Fix docstring of lookup ops.
PiperOrigin-RevId: 225462083
This commit is contained in:
parent
352a08f34f
commit
97fe55e68b
@ -91,7 +91,7 @@ def index_table_from_tensor(mapping,
|
|||||||
The bucket ID range is `[mapping size, mapping size + num_oov_buckets - 1]`.
|
The bucket ID range is `[mapping size, mapping size + num_oov_buckets - 1]`.
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.initializer.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
Elements in `mapping` cannot have duplicates, otherwise when executing the
|
Elements in `mapping` cannot have duplicates, otherwise when executing the
|
||||||
table initializer op, it will throw a `FailedPreconditionError`.
|
table initializer op, it will throw a `FailedPreconditionError`.
|
||||||
@ -158,7 +158,7 @@ def string_to_index(tensor, mapping, default_value=-1, name=None):
|
|||||||
will throw a FailedPreconditionError.
|
will throw a FailedPreconditionError.
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` once.
|
`session.run(tf.tables_initializer)` once.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ def index_to_string_table_from_tensor(mapping, default_value="UNK", name=None):
|
|||||||
(an out-of-vocabulary entry) is assigned the `default_value`
|
(an out-of-vocabulary entry) is assigned the `default_value`
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.initializer.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
Elements in `mapping` cannot have duplicates, otherwise when executing the
|
Elements in `mapping` cannot have duplicates, otherwise when executing the
|
||||||
table initializer op, it will throw a `FailedPreconditionError`.
|
table initializer op, it will throw a `FailedPreconditionError`.
|
||||||
@ -257,7 +257,7 @@ def index_to_string(tensor, mapping, default_value="UNK", name=None):
|
|||||||
(an out-of-vocabulary entry) is assigned the `default_value`
|
(an out-of-vocabulary entry) is assigned the `default_value`
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` once.
|
`session.run(tf.tables_initializer)` once.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -948,7 +948,7 @@ def index_table_from_file(vocabulary_file=None,
|
|||||||
`[vocabulary size, vocabulary size + num_oov_buckets - 1]`.
|
`[vocabulary size, vocabulary size + num_oov_buckets - 1]`.
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.init.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
To specify multi-column vocabulary files, use key_column_index and
|
To specify multi-column vocabulary files, use key_column_index and
|
||||||
value_column_index and delimiter.
|
value_column_index and delimiter.
|
||||||
@ -1077,7 +1077,7 @@ def index_table_from_tensor(vocabulary_list,
|
|||||||
`[vocabulary list size, vocabulary list size + num_oov_buckets - 1]`.
|
`[vocabulary list size, vocabulary list size + num_oov_buckets - 1]`.
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.init.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
Elements in `vocabulary_list` cannot have duplicates, otherwise when executing
|
Elements in `vocabulary_list` cannot have duplicates, otherwise when executing
|
||||||
the table initializer op, it will throw a `FailedPreconditionError`.
|
the table initializer op, it will throw a `FailedPreconditionError`.
|
||||||
@ -1179,7 +1179,7 @@ def index_to_string_table_from_file(vocabulary_file,
|
|||||||
(an out-of-vocabulary entry) is assigned the `default_value`
|
(an out-of-vocabulary entry) is assigned the `default_value`
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.init.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
To specify multi-column vocabulary files, use key_column_index and
|
To specify multi-column vocabulary files, use key_column_index and
|
||||||
value_column_index and delimiter.
|
value_column_index and delimiter.
|
||||||
@ -1276,7 +1276,7 @@ def index_to_string_table_from_tensor(vocabulary_list,
|
|||||||
(an out-of-vocabulary entry) is assigned the `default_value`
|
(an out-of-vocabulary entry) is assigned the `default_value`
|
||||||
|
|
||||||
The underlying table must be initialized by calling
|
The underlying table must be initialized by calling
|
||||||
`tf.tables_initializer.run()` or `table.init.run()` once.
|
`session.run(tf.tables_initializer)` or `session.run(table.init)` once.
|
||||||
|
|
||||||
Elements in `vocabulary_list` cannot have duplicates, otherwise when executing
|
Elements in `vocabulary_list` cannot have duplicates, otherwise when executing
|
||||||
the table initializer op, it will throw a `FailedPreconditionError`.
|
the table initializer op, it will throw a `FailedPreconditionError`.
|
||||||
|
Loading…
Reference in New Issue
Block a user