def size(self, name=None):
"""Compute the number of elements in this table.
Args:
name: A name for the operation (optional).
Returns:
A scalar tensor containing the number of elements in this table.
"""
with ops.name_scope(name, "%s_Size" % self._name,
[self._table_ref]) as name:
# pylint: disable=protected-access
return gen_data_flow_ops._lookup_table_size(self._table_ref, name=name)
# pylint: enable=protected-access
评论列表
文章目录