TensorSpec

class dragon.vm.tensorflow.TensorSpec(
  shape,
  dtype=tf.float32,
  name=None
)[source]

Spec to describe properties of a tensor.

__init__

TensorSpec.__init__(
  shape,
  dtype=tf.float32,
  name=None
)[source]

Create a TensorSpec.

Properties

dtype

TensorSpec.dtype

Return the data type.

Returns:
str – The data type.

name

TensorSpec.name

Return the spec name.

Returns:
str – The spec name.

shape

TensorSpec.shape

Return the dimensions.

Returns:
Sequence[int] – The dimensions.