Size

class dragon.vm.torch.Size(sizes)[source]

Represent the a sequence of dimensions.

__init__

Size.__init__(sizes)[source]

Create a Size.

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

Methods

numel

Size.numel()[source]

Return the total number of elements.

Returns:
int – The number of elements.