title: TypeError: 'module' object is not subscriptable (Pytorch)
body: <p>I'm currently self studying and implementing PyTorch.
  While doing transfer learning with this tutorial:
  <a href="https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html" rel="nofollow noreferrer">https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html</a></p>
  <p>I encountered an error in this particular code block:</p>
  <pre><code>image_datasets = {x: datasets.ImageFolder(os.path.join(main_dataset, x),
                                            transforms[x])
                   for x in ['Train','Test']}
  </code></pre>
  <p>The error code is as below:</p>
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-41-c83fc3ba4a1c&gt; in &lt;module&gt;()
        1 image_datasets = {x: datasets.ImageFolder(os.path.join(main_dataset, x),
        2                                           transforms[x])
  ----&gt; 3                 for x in ['Train','Test']}
  
  &lt;ipython-input-41-c83fc3ba4a1c&gt; in &lt;dictcomp&gt;(.0)
        1 image_datasets = {x: datasets.ImageFolder(os.path.join(main_dataset, x),
        2                                           transforms[x])
  ----&gt; 3                 for x in ['Train','Test']}
  
  TypeError: 'module' object is not subscriptable
  </code></pre>
  <p>Which I am certain I have not used any module wrongly or any typos in this particular code block.</p>
  <p>While searching the error code, I did not find anything related to this as well.</p>
  <p>Please help, thanks.</p>