自主选择GPU——CUDA_VISIBLE_DEVICES 环境变量说明

Environment Variable Syntax Results
CUDA_VISIBLE_DEVICES=1 Only device 1 will be seen
CUDA_VISIBLE_DEVICES=0, 1 Devices 0 and 1 will be visible
CUDA_VISIBLE_DEVICES=“0, 1” Same as above, quotation marks are optional
CUDA_VISIBLE_DEVICES=0, 2, 3 Devices 0, 2, 3 will be visible; device 1 is masked

你可能感兴趣的:(深度学习,深度学习,神经网络,pytorch,tensorflow)