TensorShape

class dragon.vm.tensorflow.TensorShape(dims)[source]

Represent the a sequence of dimensions.

__init__

TensorShape.__init__(dims)[source]

Create a TensorShape.

Parameters:
  • dims (Sequence[int]) – The dimensions.

Properties

dims

TensorShape.dims

Return the list of dimensions.

Returns:
List[int] – The dimensions.

ndims

TensorShape.ndims

Return the number of dimensions.

Deprecated. See TensorShape.rank.

Returns:
int – The number of dimensions.

rank

TensorShape.rank

Return the rank of shape.

Returns:
int – The rank.

Methods

as_list

TensorShape.as_list()[source]

Return the list of dimensions.

Returns:
List[int] – The dimensions.