Hmm that is wierd because I am running it with no problems. Could you try and run the colab version here 15 to see if you get any errors. Also outside of the training loop can you do this
data_loader = torch.utils.data.DataLoader(
        dataset, batch_size=2, shuffle=True, num_workers=4,
        collate_fn=utils.collate_fn)
next(iter(data_loader))

just to see if you get an error doing that.