You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DepthToSpace rearranges data from depth into blocks of spatial data. This is the reverse transformation of SpaceToDepth. The output tensor is a copy of the input tensor where blocks of size blocksize * blocksize from the depth dimension are moved in spatial blocks to the height and width dimensions. By default, mode = DCR. In the DCR mode, elements along the depth dimension from the input tensor are rearranged in the following order: depth, column, and then row.
Given input tensor [N,C,H,W] by default (mode = DCR] the output tensor has shape [N, C / (blocksize * blocksize), H*blocksize, W*blocksize]. The transformation can be seen as a sequence of a reshape + transpose + reshape operations:
tmp1 = reshape(input, [N, blocksize, blocksize, C // (blocksize**2), H, W])
tmp2 = transpose(tmp1, [0, 3, 4, 1, 5, 2])
out = reshape(tmp2, [N, C / (blocksize**2), H * blocksize, W * blocksize])
When mode = CRD:
tmp1 = reshape(input, [N, C / (blocksize ** 2), blocksize, blocksize, H, W])
tmp2 = transpose(tmp1, [0, 1, 4, 2, 5, 3])
out = reshape(tmp2, [N, C / (blocksize ** 2), H * blocksize, W * blocksize])
The text was updated successfully, but these errors were encountered:
DepthToSpace
rearranges data from depth into blocks of spatial data. This is the reverse transformation ofSpaceToDepth
. The output tensor is a copy of the input tensor where blocks of sizeblocksize * blocksize
from the depth dimension are moved in spatial blocks to the height and width dimensions. By default, mode = DCR. In the DCR mode, elements along the depth dimension from the input tensor are rearranged in the following order: depth, column, and then row.Given input tensor
[N,C,H,W]
by default (mode = DCR] the output tensor has shape[N, C / (blocksize * blocksize), H*blocksize, W*blocksize]
. The transformation can be seen as a sequence of a reshape + transpose + reshape operations:When
mode = CRD
:The text was updated successfully, but these errors were encountered: