I have a “torch.utils.data.DataLoader”. I want to rearrange the order of the samples. Is it possible? Answer Yes, you can use torch.utils.data.Subset and specify the indices.
Tag: dataloader
How to use ‘collate_fn’ with dataloaders?
I am trying to train a pretrained roberta model using 3 inputs, 3 input_masks and a label as tensors of my training dataset. I do this using the following code: However this gives me the following error: TypeError: vars() argument must have dict attribute Now I have found out that it is probably because I don’t use collate_fn when using