For NCHW tensor, assuming p,q,r,s
correspond to N,C,H,W
dimensions, the offset from the base address of the tensor to access a tensor value at coordinate (p,q,r,s
) is calculated using the expression below:
Macros | |
#define | NVM_TENSOR_NCHW_E_STRIDE_INDEX 0U |
Defines the stride index for NCHW element. More... | |
#define | NVM_TENSOR_NCHW_W_STRIDE_INDEX NVM_TENSOR_NCHW_E_STRIDE_INDEX |
Defines the stride index for NCHW column along the W dimension. More... | |
#define | NVM_TENSOR_NCHW_H_STRIDE_INDEX 1U |
Defines the stride index for NCHW line along the H dimension. More... | |
#define | NVM_TENSOR_NCHW_C_STRIDE_INDEX 2U |
Defines the stride index for NCHW channel. More... | |
#define | NVM_TENSOR_NCHW_N_STRIDE_INDEX 3U |
Defines the stride index for NCHW plane along the N dimension. More... | |
#define NVM_TENSOR_NCHW_C_STRIDE_INDEX 2U |
Defines the stride index for NCHW channel.
tensormetadata.dimstrides[NVM_TENSOR_NCHW_C_STRIDE_INDEX]
is stride in bytes to go from current channel(C) to the next channel(C) for NCHW tensor.
Definition at line 203 of file nvmedia_tensormetadata.h.
#define NVM_TENSOR_NCHW_E_STRIDE_INDEX 0U |
Defines the stride index for NCHW element.
tensormetadata.dimstrides[NVM_TENSOR_NCHW_E_STRIDE_INDEX]
is stride in bytes to go from current element to the next element for NCHW tensor
Definition at line 176 of file nvmedia_tensormetadata.h.
#define NVM_TENSOR_NCHW_H_STRIDE_INDEX 1U |
Defines the stride index for NCHW line along the H dimension.
tensormetadata.dimstrides[NVM_TENSOR_NCHW_H_STRIDE_INDEX]
is stride in bytes to go from one line to the next line or along H dimension for NCHW tensor.
Definition at line 195 of file nvmedia_tensormetadata.h.
#define NVM_TENSOR_NCHW_N_STRIDE_INDEX 3U |
Defines the stride index for NCHW plane along the N dimension.
tensormetadata.dimstrides[NVM_TENSOR_NCHW_N_STRIDE_INDEX]
is stride in bytes to go from one plane to the next plane along N dimension for NCHW tensor.
Definition at line 212 of file nvmedia_tensormetadata.h.
#define NVM_TENSOR_NCHW_W_STRIDE_INDEX NVM_TENSOR_NCHW_E_STRIDE_INDEX |
Defines the stride index for NCHW column along the W dimension.
tensormetadata.dimstrides[NVM_TENSOR_NCHW_W_STRIDE_INDEX]
is stride in bytes to go from one column to the next column or along W dimension for NCHW tensor. The index is assigned to the same index as for the element stride.
Definition at line 186 of file nvmedia_tensormetadata.h.