Some things I would try:

have you tried to access your datasets instance through the interactive python console (if that works, does creating a data loader interactively work too?)

https://github.com/bamos/densenet.pytorch/blob/master/train.py#L101 11 (background commands are always a bit “difficult”)

https://github.com/bamos/densenet.pytorch/blob/master/train.py#L67 17 (you need to use pin_memory? - do not know this one)