- class composer.core.MemoryFormat(value)#
Enum class to represent different memory formats.
torch.torch.memory_formatfor more details.
Default PyTorch memory format represnting a tensor allocated with consecutive dimensions sequential in allocated memory.
This is also known as NHWC. Typically used for images with 2 spatial dimensions (i.e., Height and Width) where channels next to each other in indexing are next to each other in allocated memory. For example, if C is at memory location M_0 then C is at memory location M_1, etc.
This can also be referred to as NTHWC. Same as
CHANNELS_LASTbut for videos with 3 spatial dimensions (i.e., Time, Height and Width).
A way to tell operations to make the output tensor to have the same memory format as the input tensor.