PyTorch not working when using Pytorch with cuda 11.1: Dataloader
So, I'm running this deep neural network. And normally, when i train it with the cpu using the pytorch library WITHOUT cuda, it runs fine.
However, I noticed when I installed pytorch+cuda 11.1, whenever I try to enumerate over the Dataloader, the following error gets thrown out:
OSError: [WinError 1455] The paging file is too small for this operation to complete. Error loading &quot;C:\Users\Name\Desktop\Folder\lib\site-packages\torch\lib\cudnn_adv_train64_8.dll&quot; or one of its dependencies.

But, when i use pip to uninstall pytorch+cuda and install pytorch without cuda, my script runs fine.
both versions of pytorch are 1.8.0
Does anyone know how to go about fixing this? Would love to be able to use this gpu.
Note: This is how i set up the dataloader:
    train_dataloader = DataLoader(
        train_dataset,
        batch_size=args.batch_size,
        num_workers=args.num_workers,
        shuffle=True,
        pin_memory=(device == &quot;cuda&quot;),
    )


See this issue on the PyTorch github page: https://github.com/Spandan-Madan/Pytorch_fine_tuning_Tutorial/issues/10
Basically you need to turn off the automatic paging file management in Windows.

Windows Key
Search for: advanced system settings
Advanced tab
Performance - &quot;Settings&quot; button
Advanced tab - &quot;Change&quot; button
Uncheck the &quot;Automatically manage paging file size for all drives&quot; checkbox
Select the &quot;System managed size&quot; radio button.
Reboot

