TI Deep Learning Product User Guide
|
This structure defines the parameters for custom layer in TIDL.
Data Fields | |
int32_t | customLayerType |
int32_t | padW |
int32_t | padH |
int32_t | memOverlapType |
int32_t | doesLayerChangePadding |
int32_t | doesLayerFillOutXPadding |
int32_t | rsvdPassThrough |
int32_t sTIDL_CustomParams_t::customLayerType |
Type of the custom layer
int32_t sTIDL_CustomParams_t::padW |
Horizontal Padding requirement in number of elements. This is the padding amount expected by the processing function on input
int32_t sTIDL_CustomParams_t::padH |
Vertical Padding requirement in number of elements.This is the padding amount expected by the processing function on input
int32_t sTIDL_CustomParams_t::memOverlapType |
Parameter specifying whether input and output memory can overlap 0: Input cannot be overwritten by output 1: Input can be overwritten by input Note : By default this will be 0
int32_t sTIDL_CustomParams_t::doesLayerChangePadding |
Parameter to indicate whether the input and output padding of the custom layer can change or not. This information is used by TIDL to reomve the output padding if consumer layer's doesn't need it and similarly add output padding if required by the consumer layer's. Note : By default this will be 0
int32_t sTIDL_CustomParams_t::doesLayerFillOutXPadding |
This parameter indicates whether the custom layer can fill the column padding area with zero as parts of its processing. As such TIDL always perform the padding in Y direction (top and bottom padding, marked as y in below figure) so it is advisable that custom layer writer doesn't worry about making the padding pixels in Y direction to be zero. But in X direction (Left and right padding) padding pixels can be zeroed out by custom layer writer if it is easy and optimal as part of kernel processing of that layer and if not then TIDL will perform the padding. Another point to note is that TIDL has only one padding in X direction and it uses the same padding for left and right padding. This is how the padding layout looks in the buffer, here "y" is the top and bottom padding region, x is the left padding and "-" the active region of the kernel. Note that there is no right padding in the buffer, so processing function is expected to use this layout for processing:
yyyyyyyyyyyyyyyyyyyyyyyyyyyy y------------------------— x------------------------— x------------------------— x------------------------— x------------------------— x------------------------— xyyyyyyyyyyyyyyyyyyyyyyyyyyy y
Note : By default this will be 0
int32_t sTIDL_CustomParams_t::rsvdPassThrough |
This is a pass through variable and user shouldn't program/update it