ONE - On-device Neural Engine
|
Convert a raw padding to a spatial padding of a given spatial rank. More...
#include <PaddingUtils.h>
Public Member Functions | |
SpatialPadding | with (const RawPadding &raw) const |
Friends | |
SpatialPaddingBuilder | build_spatial_padding (uint32_t spatial_rank) |
Convert a raw padding to a spatial padding of a given spatial rank.
Definition at line 55 of file PaddingUtils.h.
SpatialPadding SpatialPaddingBuilder::with | ( | const RawPadding & | raw | ) | const |
Definition at line 91 of file PaddingUtils.cpp.
References PaddingBase< Derived >::count(), PaddingBase< Derived >::resize(), and PaddingBase< Derived >::value().
Referenced by PoolingSpec::horizontal_pad(), ConvolutionSpec::pad(), and PoolingSpec::vertical_pad().
|
friend |
SpatialPaddingBuilder is introduced to support the following code pattern:
auto raw_padding = build_raw_padding().with(conv_param); auto spatial_padding = build_spatial_padding(4).with(raw_padding);
Definition at line 128 of file PaddingUtils.cpp.