用法:
mxnet.ndarray.op.depth_to_space(data=None, block_size=_Null, out=None, name=None, **kwargs)
out:- 此函數的輸出。
NDArray 或 NDArray 列表
參數:
返回:
返回類型:
將數據從深度重新排列(置換)到空間數據塊中。類似於 ONNX DepthToSpace 運算符:https://github.com/onnx/onnx/blob/master/docs/Operators.md#DepthToSpace 。輸出是一個新的張量,其中深度維度的值在空間塊中移動到高度和寬度維度。此操作的逆操作是
space_to_depth
。 .. 數學:\begin{gather*} x \prime = reshape(x, [N, block\_size, block\_size, C / (block\_size ^ 2), H * block\_size, W * block\_size]) \\ x \prime \prime = transpose(x \prime, [0, 3, 4, 1, 5, 2]) \\ y = reshape(x \prime \prime, [N, C / (block\_size ^ 2), H * block\_size, W * block\_size]) \end{gather*}
其中 是默認布局為 的輸入張量:[batch, channels, height, width] 和 是布局 的輸出張量示例:
x = [[[[0, 1, 2], [3, 4, 5]], [[6, 7, 8], [9, 10, 11]], [[12, 13, 14], [15, 16, 17]], [[18, 19, 20], [21, 22, 23]]]] depth_to_space(x, 2) = [[[[0, 6, 1, 7, 2, 8], [12, 18, 13, 19, 14, 20], [3, 9, 4, 10, 5, 11], [15, 21, 16, 22, 17, 23]]]]
相關用法
- Python mxnet.ndarray.op.diag用法及代碼示例
- Python mxnet.ndarray.op.uniform用法及代碼示例
- Python mxnet.ndarray.op.sample_negative_binomial用法及代碼示例
- Python mxnet.ndarray.op.khatri_rao用法及代碼示例
- Python mxnet.ndarray.op.unravel_index用法及代碼示例
- Python mxnet.ndarray.op.slice_like用法及代碼示例
- Python mxnet.ndarray.op.L2Normalization用法及代碼示例
- Python mxnet.ndarray.op.softmax_cross_entropy用法及代碼示例
- Python mxnet.ndarray.op.round用法及代碼示例
- Python mxnet.ndarray.op.linalg_det用法及代碼示例
- Python mxnet.ndarray.op.sample_uniform用法及代碼示例
- Python mxnet.ndarray.op.sort用法及代碼示例
- Python mxnet.ndarray.op.linalg_potrf用法及代碼示例
- Python mxnet.ndarray.op.linalg_potri用法及代碼示例
- Python mxnet.ndarray.op.broadcast_minus用法及代碼示例
- Python mxnet.ndarray.op.take用法及代碼示例
- Python mxnet.ndarray.op.pad用法及代碼示例
- Python mxnet.ndarray.op.erfinv用法及代碼示例
- Python mxnet.ndarray.op.UpSampling用法及代碼示例
- Python mxnet.ndarray.op.Reshape用法及代碼示例
- Python mxnet.ndarray.op.sample_gamma用法及代碼示例
- Python mxnet.ndarray.op.linalg_gemm2用法及代碼示例
- Python mxnet.ndarray.op.linalg_slogdet用法及代碼示例
- Python mxnet.ndarray.op.linalg_gemm用法及代碼示例
- Python mxnet.ndarray.op.floor用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.ndarray.op.depth_to_space。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。