You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a confusion in the use of the GPUs. the function Neural_Network use le variable gpu_number (version 0.34), but if the GPU=0 is busy and I get an error. The last version of miscnn use the variable multi_gpu=boolean.
Could you explain to me how to set the use of a particular gpu.
Thank
The text was updated successfully, but these errors were encountered:
the old parameter gpu_number of the Neural_Network class defines the number of gpus which will be used in parallel for multi-gpu usage. So a single model training uses multiple gpu's in order to speed up the process.
The Neural Network class used the Keras 'multi_gpu_model' function in which you can specify how many gpus you want to use. Now, this function is deprecated and was replaced with the MirroredStrategy from Tensorflow, which works more like a boolean on/off switch. Therefore, I replaced the Neural_Network class parameter gpu_number (int, by default=1) with the new variable multi_gpu (boolean, by default False).
Could you explain to me how to set the use of a particular gpu.
If you have multiple GPUs in your cluster, let's say we have 4 GPUs, but the first two GPUs (0 & 1) are already in use by your colleague, than you have to tell your system to use only the last 2 GPUs (2 & 3).
How can we do this:
-> Via Bash:
# Define the environment variable CUDA_VISIBLE_DEVICES with a single GPU idexport CUDA_VISIBLE_DEVICES=2
# Or for multiple GPU idsexport CUDA_VISIBLE_DEVICES=2,3
-> Via Python and environment variables at the start of the script:
importos# Single GPU ID 2os.environ["CUDA_VISIBLE_DEVICES"] ="2"# Multiple GPUs (2 & 3)os.environ["CUDA_VISIBLE_DEVICES"] ="2,3"
Be aware that the Python variant requires that the ids are provided as string.
Hi,
I have a confusion in the use of the GPUs. the function Neural_Network use le variable gpu_number (version 0.34), but if the GPU=0 is busy and I get an error. The last version of miscnn use the variable multi_gpu=boolean.
Could you explain to me how to set the use of a particular gpu.
Thank
The text was updated successfully, but these errors were encountered: