title: pytorch - net.cuda() seems don't work
body: <p>I wrote a cnn module to do digit recognition using pytorch, then try to train the network with gpu but got following error.</p>
  
  <pre><code>Traceback (most recent call last):
    File "main.py", line 51, in &lt;module&gt;
      outputs = cnn(inputs)
    File "/home/daniel/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
      result = self.forward(*input, **kwargs)
    File "/home/daniel/Code/kaggle-competitions/digit-recognizer/Net.py", line 40, in forward
      x = self.pool(F.relu(self.conv[i](x)))
    File "/home/daniel/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 357, in __call__
      result = self.forward(*input, **kwargs)
    File "/home/daniel/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 282, in forward
      self.padding, self.dilation, self.groups)
    File "/home/daniel/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/nn/functional.py", line 90, in conv2d
      return f(input, weight, bias)
  RuntimeError: Input type (CUDAFloatTensor) and weight type (CPUFloatTensor) should be the same
  </code></pre>
  
  <p>here is my <a href="https://github.com/team6612/kaggle-competitions/tree/master/digit-recognizer" rel="nofollow noreferrer">source code</a></p>
  
  <p>It seems that <code>cnn.cuda()</code> didn't work properly because I got the same error after removing it. But I have no idea how to fix it.</p>