I’m doing some image classification, and for each image, I’ve a single boolean meta-feature.
How should I encode the meta-feature to my dataset so that I could access it during the training
when I fetch a batch from the dataloader? I’ll not pass this feature to the network that I’m training, but rather reweight the instance btw.
I think making Dataset instance to return a batch of metadata with images (and targets) is a way if the meta-features can be represented in torch.Tensor.
For example, if we use the dataset defined below, in each iteration a DataLoader will generate a tuple of (image, target, metas), where each item is a torch.Tensor.