Watch talks from the 2019 TensorFlow Dev Summit Watch now

tff.TensorType

Class TensorType

Inherits From: Type

Defined in core/api/computation_types.py.

An implementation of tff.Type representing types of tensors in TFF.

__init__

__init__(
    dtype,
    shape=None
)

Constructs a new instance from the given dtype and shape.

Args:

  • dtype: An instance of tf.DType.
  • shape: An optional instance of tf.TensorShape or an argument that can be passed to its constructor (such as a list or a tuple), or None for the default scalar shape. Unspecified shapes are not supported.

Raises:

  • TypeError: if arguments are of the wrong types.

Properties

dtype

shape

Methods

__eq__

__eq__(other)

__ne__

__ne__(other)