MCPcopy Index your code
hub / github.com/tensorflow/hub / get_shape

Method get_shape

tensorflow_hub/tensor_info.py:59–68  ·  view source on GitHub ↗

The `TensorShape` that represents the dense shape of this tensor.

(self)

Source from the content-addressed store, hash-verified

57 % self._type_spec)
58
59 def get_shape(self):
60 """The `TensorShape` that represents the dense shape of this tensor."""
61 if hasattr(self._type_spec, "shape"):
62 return self._type_spec.shape
63 elif hasattr(self._type_spec, "_shape"):
64 # Prior to TF version 2.3, RaggedTensor._shape was private.
65 return self._type_spec._shape # pylint: disable=protected-access
66 else:
67 raise ValueError("Expected TypeSpec %r to have a shape attribute"
68 % self._type_spec)
69
70 @property
71 def is_sparse(self):

Callers 3

__repr__Method · 0.95
add_final_retrain_opsFunction · 0.80

Calls

no outgoing calls

Tested by 1