I can run the Jupyter notebook version of this without any issues but the reinforcement_learing.py version gives me an error:
Found GPU0 NVS 4200M which is of cuda capability 2.1.
PyTorch no longer supports this GPU because it is too old.
warnings.warn(old_gpu_warn % (d, name, major, capability[1]))
Traceback (most recent call last):
File “/media/nobu/Ubuntu Backup/Comp Sci/_DeepLearning/pytorch/reinforcement_q_learning.py”, line 460, in
state = current_screen - last_screen
RuntimeError: CUDA error: no kernel image is available for execution on the device
Your GPU is quite old by now and the PyTorch binaries do not ship CUDA with the necessary compute capability. If you really want to use this GPU, you could try to build from source as described here. However, as far as I can tell your GPU should only have ~1GB of memory besides a probably low performance.