TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfds.features.TensorInfo

View source

Class TensorInfo

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

__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.