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

Method num_elements

tensorflow/python/framework/tensor_shape.py:897–905  ·  view source on GitHub ↗

Returns the total number of elements, or none for incomplete shapes.

(self)

Source from the content-addressed store, hash-verified

895 return Dimension(None)
896
897 def num_elements(self):
898 """Returns the total number of elements, or none for incomplete shapes."""
899 if self.is_fully_defined():
900 size = 1
901 for dim in self._dims:
902 size *= dim.value
903 return size
904 else:
905 return None
906
907 def merge_with(self, other):
908 """Returns a `TensorShape` combining the information in `self` and `other`.

Callers 15

byte_size_load_fnFunction · 0.95
testChainOfMatmulMethod · 0.95
_use_composite_implFunction · 0.45
__init__Method · 0.45
size_internalFunction · 0.45
boolean_maskFunction · 0.45
_partitionerFunction · 0.45
batch_jacobianFunction · 0.45
_constant_implFunction · 0.45
batch_jacobianMethod · 0.45
_unary_op_flopsFunction · 0.45
_l2_loss_flopsFunction · 0.45

Calls 1

is_fully_definedMethod · 0.95