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

Method size

tensorflow/python/ops/lookup_ops.py:1948–1959  ·  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

1946 return self._table_name
1947
1948 def size(self, name=None):
1949 """Compute the number of elements in this table.
1950
1951 Args:
1952 name: A name for the operation (optional).
1953
1954 Returns:
1955 A scalar tensor containing the number of elements in this table.
1956 """
1957 with ops.name_scope(name, "%s_Size" % self.name, [self.resource_handle]):
1958 with ops.colocate_with(self.resource_handle):
1959 return gen_lookup_ops.lookup_table_size_v2(self.resource_handle)
1960
1961 def lookup(self, keys, name=None):
1962 """Looks up `keys` in a table, outputs the corresponding values.

Callers 15

testBasicMethod · 0.95
testBasicBoolMethod · 0.95
testMapStringToFloatMethod · 0.95
testMapInt64ToFloatMethod · 0.95
testVectorValuesMethod · 0.95
testVectorKeysMethod · 0.95
testResizeMethod · 0.95
testExportMethod · 0.95
testSaveRestoreMethod · 0.95

Calls 2

colocate_withMethod · 0.80
name_scopeMethod · 0.45

Tested by 15

testBasicMethod · 0.76
testBasicBoolMethod · 0.76
testMapStringToFloatMethod · 0.76
testMapInt64ToFloatMethod · 0.76
testVectorValuesMethod · 0.76
testVectorKeysMethod · 0.76
testResizeMethod · 0.76
testExportMethod · 0.76
testSaveRestoreMethod · 0.76