title: Pytorch - Subclasses of torchvision.dataset.ImageFolder - Import Error
body: <p>Following my last <a href="https://stackoverflow.com/questions/50798172/pytorch-how-to-make-the-trainloader-use-a-specific-amount-of-images">post</a>, I am now trying to implement a subclass of the <code>torchvision.datasets.ImageFolder</code> class. The following code returns an error (<code>"name 'default_loader' is not defined"</code>), and I can't figure out why. Will you please help me?</p>
  
  <pre><code>class ExtendingImageFolder(torchvision.datasets.ImageFolder)
     def __init__(self,root,transform=None, target_transform=None,loader=default_loader):
         super().__init__(root,transform,target_transform,loader)
  </code></pre>
  
  <p>When I delete the "<code>None</code>" and "<code>default_loader</code>", and write it like this;</p>
  
  <pre><code>    class ExtendingImageFolder(torchvision.datasets.ImageFolder)
     def __init__(self,root,transform, target_transform,loader):
         super().__init__(root,transform,target_transform,loader)
  </code></pre>
  
  <p>I get an error of missing input arguments when trying to create an instance of this class, like:</p>
  
  <pre><code>JJ=ExtendingImageFolder(root='C:/',transform=transform)
  </code></pre>
  
  <p>What am I doing wrong here?</p>
  
  <p>Thanks in advance! </p>