bartorch.resize#
- bartorch.resize()#
Crop or zero-pad
inputtooshape.- Parameters:
oshape (tuple of int) – Full output shape, one size per axis of
input.anchor ({"center", "front", "start"}, default='center') – What is kept in place.
"center"keeps indexn // 2atm // 2;"front"keeps the last element and crops or pads at the beginning;"start"keeps the first element and crops or pads at the end.