I think the just like loader, self.features_vec is also not instantiated. I get,
  File "/media/storage/dev/utils.py", line 65, in __init__
    del self.features_vec
AttributeError: DataLoader1 instance has no attribute 'features_vec'

when I do
        try:
            self.features_vec = torch.zeros((self.num_samples, self.max_seq_len), dtype=torch.long, device=self.device)
        except RuntimeError as e:
            del self.features_vec
            torch.cuda.empty_cache()
            raise e