I have some PyTorch code in one Jupyter Notebook which needs to run on one specified gpu (that is, not 'gpu 0'). Because GPU 0 is working by others. I have tried this:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
But this is not work! So how to make the code run on one specified gpu successfully?