title: TypeError: 'dict' object is not callable while loading and testing PyTorch model
body: <p>I am trying to load and test my final trained PyTorch model but I am getting the following error. What am I doing wrong?</p>
  <p><strong>Original Code:</strong></p>
  <pre><code>class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
  
  model = torch.load('Final_model.pth.tar')
  
  normalize = transforms.Normalize(mean=[0.4914, 0.4824, 0.4467],std=[0.2471, 0.2435, 0.2616])
  transform = transforms.Compose([transforms.ToTensor(),normalize])
  val_set = datasets.CIFAR10('../data', train=False,download=True,transform=transform)
  
  for i in range(48,64):
      plt.subplot(4,4,i+1-48)
      plt.subplots_adjust(hspace=1,wspace=1)
      plt.xticks([])
      plt.yticks([])
      plt.imshow(val_set.data[i])
      out = model(transform(val_set.data[i]).view(1,3,32,32))[0].tolist()
      plt.xlabel(class_names[out.index(max(out))])
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>    TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-48-8554fc617196&gt; in &lt;module&gt;()
       18     plt.yticks([])
       19     plt.imshow(val_set.data[i])
  ---&gt; 20     out = model(transform(val_set.data[i]).view(1,3,32,32))[0].tolist()
       21     plt.xlabel(class_names[out.index(max(out))])
       22 
  
  TypeError: 'dict' object is not callable
  </code></pre>