Channel_shuffle
Channel_shuffle
torch_channel_shuffle(self, groups)
self |
(Tensor) the input tensor |
groups |
(int) number of groups to divide channels in and rearrange. |
math:(*, C , H, W)
:
Divide the channels in a tensor of shape (*, C , H, W) into g groups and rearrange them as (*, C \frac g, g, H, W), while keeping the original tensor shape.
if (torch_is_installed()) { input <- torch_randn(c(1, 4, 2, 2)) print(input) output <- torch_channel_shuffle(input, 2) print(output) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.