mindspore.ops.BatchToSpaceND

class mindspore.ops.BatchToSpaceND(block_shape, crops)[源代码]

ops.BatchToSpaceND 从2.0版本开始已被弃用,并将在未来版本中被移除,建议使用 ops.batch_to_space_nd 代替。

支持平台:

Ascend GPU CPU

样例:

>>> block_size = 2
>>> crops = [[0, 0], [0, 0]]
>>> batch_to_space = ops.BatchToSpaceND(block_size, crops)
>>> input_x = Tensor(np.array([[[[1]]], [[[2]]], [[[3]]], [[[4]]]]), mindspore.float32)
>>> output = batch_to_space(input_x)
>>> print(output)
[[[[1.  2.]
   [3.  4.]]]]