shaun:

So I’m not sure how to get a validation set out of this.


If the dataset is reasonably simple, you can split the dataset like so:

  
      gist.github.com
  
  
    https://gist.github.com/t-vi/9f6118ff84867e89f3348707c7a1271f 48
validation_set_split.py
import torch.utils.data
from torchvision import datasets, transforms

class PartialDataset(torch.utils.data.Dataset):
    def __init__(self, parent_ds, offset, length):
        self.parent_ds = parent_ds
        self.offset = offset
        self.length = length
        assert len(parent_ds)>=offset+length, Exception("Parent Dataset not long enough")
        super(PartialDataset, self).__init__()
This file has been truncated. show original




  
  
    
    
  
  


Best regards
Thomas