ExTorch.MemoryFormat (extorch v0.1.0-pre0)
A torch.memory_format
is an object representing the memory format on which
a torch.Tensor
is or will be allocated.
Possible values are:
:contiguous
: Tensor is or will be allocated in dense non-overlapping memory. Strides represented by values in decreasing order.:channels_last
: Tensor is or will be allocated in dense non-overlapping memory. Strides represented by values instrides[0] > strides[2] > strides[3] > strides[1] == 1
aka NHWC order.:preserve_format
: Used in functions like clone to preserve the memory format of the input tensor. If input tensor is allocated in dense non-overlapping memory, the output tensor strides will be copied from the input. Otherwise output strides will followcontiguous
Link to this section Summary
Types
A torch.memory_format
is an object representing the memory format on which
a torch.Tensor
is or will be allocated.
Link to this section Types
Link to this type
memory_format()
@type memory_format() ::
:contiguous | :channels_last | :preserve_format | :channels_last_3d
A torch.memory_format
is an object representing the memory format on which
a torch.Tensor
is or will be allocated.