MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / size

Method size

tensorflow/python/ops/lookup_ops.py:1692–1703  ·  view source on GitHub ↗

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.

(self, name=None)

Source from the content-addressed store, hash-verified

1690 return self._table_name
1691
1692 def size(self, name=None):
1693 """Compute the number of elements in this table.
1694
1695 Args:
1696 name: A name for the operation (optional).
1697
1698 Returns:
1699 A scalar tensor containing the number of elements in this table.
1700 """
1701 with ops.name_scope(name, "%s_Size" % self.name, [self.resource_handle]):
1702 with ops.colocate_with(self.resource_handle):
1703 return gen_lookup_ops.lookup_table_size_v2(self.resource_handle)
1704
1705 def remove(self, keys, name=None):
1706 """Removes `keys` and its associated values from the table.

Calls 2

colocate_withMethod · 0.80
name_scopeMethod · 0.45