Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfds.features.TensorInfo

View source on GitHub

Structure containing info on the tf.Tensor shape/dtype.

tfds.features.TensorInfo(
    shape, dtype, default_value=None, sequence_rank=None
)

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.

Methods

__eq__

View source

__eq__(
    other
)

Equality.

copy_from

View source

@classmethod
copy_from(
    cls, tensor_info
)

Copy constructor.