Skip to content

Commit

Permalink
Fix ShuffleNet ONNX export (#7686)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com>
  • Loading branch information
justanhduc and NicolasHug authored Jun 22, 2023
1 parent b5401b9 commit f02caa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/models/shufflenetv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def channel_shuffle(x: Tensor, groups: int) -> Tensor:
x = torch.transpose(x, 1, 2).contiguous()

# flatten
x = x.view(batchsize, -1, height, width)
x = x.view(batchsize, num_channels, height, width)

return x

Expand Down

0 comments on commit f02caa5

Please sign in to comment.