reference: How linux server to specify the amount and gpu
Method 1: In the command line
CUDA_VISIBLE_DEVICES=0
Method 2: python file
OS Import
os.environ [ "CUDA_VISIBLE_DEVICES"] = "0" specifies the first one gpu #
reference: How linux server to specify the amount and gpu
Method 1: In the command line
CUDA_VISIBLE_DEVICES=0
Method 2: python file
OS Import
os.environ [ "CUDA_VISIBLE_DEVICES"] = "0" specifies the first one gpu #