|
|
|
@ -2619,6 +2619,8 @@ class SpaceToBatchND(PrimitiveWithInfer):
|
|
|
|
|
|
|
|
|
|
for elem in block_shape:
|
|
|
|
|
validator.check('block_shape element', elem, '', 1, Rel.GE, self.name)
|
|
|
|
|
validator.check_value_type('block_shape element', elem, [int], self.name)
|
|
|
|
|
|
|
|
|
|
self.block_shape = block_shape
|
|
|
|
|
|
|
|
|
|
validator.check('paddings shape', np.array(paddings).shape, '', (block_rank, 2), Rel.EQ, self.name)
|
|
|
|
@ -2661,7 +2663,7 @@ class BatchToSpaceND(PrimitiveWithInfer):
|
|
|
|
|
The length of block_shape is M correspoding to the number of spatial dimensions.
|
|
|
|
|
crops (list): The crop value for H and W dimension, containing 2 sub list, each containing 2 int value.
|
|
|
|
|
All values must be >= 0. crops[i] specifies the crop values for spatial dimension i, which corresponds to
|
|
|
|
|
input dimension i+2. It is required that input_shape[i+2]*block_size[i] > crops[i][0]+crops[i][1].
|
|
|
|
|
input dimension i+2. It is required that input_shape[i+2]*block_shape[i] > crops[i][0]+crops[i][1].
|
|
|
|
|
|
|
|
|
|
Inputs:
|
|
|
|
|
- **input_x** (Tensor) - The input tensor.
|
|
|
|
@ -2697,6 +2699,8 @@ class BatchToSpaceND(PrimitiveWithInfer):
|
|
|
|
|
|
|
|
|
|
for elem in block_shape:
|
|
|
|
|
validator.check('block_shape element', elem, '', 1, Rel.GE, self.name)
|
|
|
|
|
validator.check_value_type('block_shape element', elem, [int], self.name)
|
|
|
|
|
|
|
|
|
|
self.block_shape = block_shape
|
|
|
|
|
|
|
|
|
|
validator.check('crops shape', np.array(crops).shape, '', (block_rank, 2), Rel.EQ, self.name)
|
|
|
|
|