title: How to obtain the path name of train_dataset after using random_split in torch
body: <p>I have the following code:</p>
  <pre><code>import torch, torchvision
  root_dataset =&quot;./data&quot;
  dataset = torchvision.datasets.folder.ImageFolder(root=root_dataset, transform=None, target_transform=None)
  train_dataset, valid_dataset = torch.utils.data.dataset.random_split(
      dataset=dataset,
      lengths=[num_train, num_valid]
  )
  </code></pre>
  <p>My question is:</p>
  <p>How can I obtain the name list of the path of <code>train_dataset</code> after using <code>random_split</code> in <code>torch</code>?</p>
  <p>Thank you.</p>