mltk.core.TflitePadding¶
- class TflitePadding[source]¶
Padding types
This may be instantiated with either an integer OR string, e.g.:
padding = TflitePadding(0) padding = TflitePadding('same')
Properties
Add zeros to the borders of the input so that the output has the same dimensions when applying the kernel
Apply the kernel only the valid regions of the input, the output dimensions will be reduced
The calculated width of the padding for the current layer
The calculated height of the padding for the current layer
Methods
Return the padding as a string
- SAME = 0¶
Add zeros to the borders of the input so that the output has the same dimensions when applying the kernel
out_height = ceil(float(in_height) / float(stride_height)) out_width = ceil(float(in_width) / float(stride_width))
- VALID = 1¶
Apply the kernel only the valid regions of the input, the output dimensions will be reduced
out_height = ceil(float(in_height - filter_height + 1) / float(stride_height)) out_width = ceil(float(in_width - filter_width + 1) / float(stride_width))
- property width: int¶
The calculated width of the padding for the current layer
- Return type:
int
- property height: int¶
The calculated height of the padding for the current layer
- Return type:
int