TensorFlow 2.0 Beta is available Learn more

tfds.features.TensorInfo

Class TensorInfo

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

View source

__init__

View source

__init__(
    shape,
    dtype,
    default_value=None,
    sequence_rank=None
)

Constructor.

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.