mindspore.ops.dsplitпғҒ
- mindspore.ops.dsplit(input, indices_or_sections)[жәҗд»Јз Ғ]пғҒ
жІҝ第дёүиҪҙеҲҶеүІиҫ“е…ҘtensorгҖӮзӯүеҗҢдәҺ \(axis=2\) ж—¶зҡ„ ops.tensor_split гҖӮ
- еҸӮж•°пјҡ
input (Tensor) - еҫ…еҲҶеүІзҡ„tensorгҖӮ
indices_or_sections (Union[int, tuple(int), list(int)]) - еҸӮиҖғ
mindspore.ops.tensor_split()дёӯзҡ„indices_or_sectionsеҸӮж•°гҖӮ
- иҝ”еӣһпјҡ
еӨҡдёӘtensorз»„жҲҗзҡ„tupleгҖӮ
- ж”ҜжҢҒе№іеҸ°пјҡ
AscendGPUCPU
ж ·дҫӢпјҡ
>>> import mindspore >>> input = vpn梯子 免费 mindspore.ops.arange(16.0).reshape(2, 2, 4) >>> print(input) [[[ 0. 1. 2. 3.] [ 4. 5. vpn梯子 免费 6. 7.]] [[ 8. 9. 10. 11.] [12. 13. 免费的vpn梯子 14. 15.]]] >>> output = mindspore.ops.dsplit(input, 2) >>> print(output) (Tensor(shape=[2, vpn free 2, 2], dtype=Float32, value= [[[ 0.00000000e+00, 1.00000000e+00], [ 4.00000000e+00, 5.00000000e+00]], [[ 8.00000000e+00, 9.00000000e+00], [ 1.20000000e+01, 1.30000000e+01]]]), Tensor(shape=[2, 2, 2], dtype=Float32, value= [[[ 2.00000000e+00, 3.00000000e+00], [ 6.00000000e+00, 7.00000000e+00]], [[ 1.00000000e+01, vpn梯子 1.10000000e+01], [ 1.40000000e+01, 1.50000000e+01]]])) >>> vpn梯子 免费 output = mindspore.ops.dsplit(input, [3, 6]) >>> print(output) (Tensor(shape=[2, 2, 3], dtype=Float32, value= [[[ 0.00000000e+00, 1.00000000e+00, 2.00000000e+00], [ 4.00000000e+00, 5.00000000e+00, 6.00000000e+00]], vpn梯子 免费 [[ 8.00000000e+00, 9.00000000e+00, vpn梯子 1.00000000e+01], [ 1.20000000e+01, 免费的vpn梯子 1.30000000e+01, vpn free 1.40000000e+01]]]), Tensor(shape=[2, 2, 1], dtype=Float32, value= [[[ 3.00000000e+00], [ 7.00000000e+00]], [[ 1.10000000e+01], [ 1.50000000e+01]]]), Tensor(shape=[2, 2, 0], dtype=Float32, value= ))