shanglianlm0525 / PyTorch-Networks

Pytorch implementation of cnn network
1.91k stars 485 forks source link

MDConv class in Mixnet,bug:Expected object of device type cuda but got device type cpu for argument #2 'weight' in call to _thnn_conv_depthwise2d_forward #23

Open GitHubyu007 opened 2 years ago

GitHubyu007 commented 2 years ago

SolveMixnet:MDConv class self.layers add to the network by self.layers = nn.Sequential(*self.layers【Better change the name or something】) Otherwise an error:RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'weight' in call to _thnn_conv_depthwise2d_forward