![]() |
Structure containing info on the tf.Tensor
shape/dtype.
tfds.features.TensorInfo(
shape: tfds.typing.Shape
,
dtype: tf.dtypes.DType,
default_value=None,
sequence_rank: tfds.typing.Dim
= None,
dataset_lvl: int = 0
)
Args | |
---|---|
shape
|
tuple[int] , shape of the tensor
|
dtype
|
Tensor dtype |
default_value
|
Used for retrocompatibility with previous files if a new field is added to provide a default value when reading the file. |
sequence_rank
|
int , Number of tfds.features.Sequence dimension.
|
dataset_lvl
|
int , if >0, nesting level of a tfds.features.Dataset .
|
Attributes | |
---|---|
dataset_lvl
|
|
default_value
|
|
dtype
|
|
numpy_dtype
|
|
sequence_rank
|
|
shape
|
Methods
copy_from
@classmethod
copy_from( tensor_info: 'TensorInfo' ) -> 'TensorInfo'
Copy constructor.
from_tensor_spec
@classmethod
from_tensor_spec( tensor_spec: tf.TensorSpec ) -> 'TensorInfo'
__eq__
__eq__(
other
)
Equality.