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