title: Torchvision.transforms implementation of Flatten()
body: <p>I have grayscale images, but I need transform it to a dataset of 1d vectors
  How can I do this? I could not find a suitable method in transforms:</p>
  <pre class="lang-py prettyprint-override"><code>train_dataset = torchvision.datasets.ImageFolder(root='./data',train=True, transform=transforms.ToTensor())
  test_dataset = torchvision.datasets.ImageFolder(root='./data',train=False, transform=transforms.ToTensor())
  
  train_loader = torch.utils.data.DataLoader(dataset=train_dataset, batch_size=4, shuffle=True)
  test_loader = torch.utils.data.DataLoader(dataset=test_dataset, batch_size=4, shuffle=False)
  </code></pre>