title: "RuntimeError: Expected 4-dimensional input for 4-dimensional weight 32 3 3, but got 3-dimensional input of size [3, 224, 224] instead"?
body: <p>I am trying to use a pre-trained model. Here's where the problem occurs</p>
  
  <p>Isn't the model supposed to take in a simple colored image? Why is it expecting a 4-dimensional input?</p>
  
  <pre><code>RuntimeError                              Traceback (most recent call last)
  &lt;ipython-input-51-d7abe3ef1355&gt; in &lt;module&gt;()
       33 
       34 # Forward pass the data through the model
  ---&gt; 35 output = model(data)
       36 init_pred = output.max(1, keepdim=True)[1] # get the index of the max log-probability
       37 
  
  5 frames
  /usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py in forward(self, input)
      336                             _pair(0), self.dilation, self.groups)
      337         return F.conv2d(input, self.weight, self.bias, self.stride,
  --&gt; 338                         self.padding, self.dilation, self.groups)
      339 
      340 
  
  RuntimeError: Expected 4-dimensional input for 4-dimensional weight 32 3 3, but got 3-dimensional input of size [3, 224, 224] instead
  </code></pre>
  
  <p>Where </p>
  
  <pre><code>inception = models.inception_v3()
  model = inception.to(device)
  </code></pre>