Comments (1)
Hey @mcastrorennes,
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).
References:
https://www.tensorflow.org/api_docs/python/tf/keras/utils/multi_gpu_model
https://www.tensorflow.org/api_docs/python/tf/distribute/MirroredStrategy
frankkramer-lab/MIScnn#44
Specify a single or multiple particular GPUs:
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 id
export CUDA_VISIBLE_DEVICES=2
# Or for multiple GPU ids
export CUDA_VISIBLE_DEVICES=2,3
-> Via Python and environment variables at the start of the script:
import os
# Single GPU ID 2
os.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.
-> Via Python with Tensorflow:
Check out this:
https://www.tensorflow.org/guide/gpu#using_a_single_gpu_on_a_multi-gpu_system
Hope that I was able to help you.
Cheers,
Dominik
from covid19.miscnn.
Related Issues (20)
- Cannot import split module HOT 2
- About running errors HOT 2
- Prediction could not be found "predictions/coronacases_001.nii.gz" HOT 1
- Time HOT 1
- Getting Error in run_miscnn HOT 2
- How to Make Predictions of a set of new images with the trained model and save it as nii file? What is the procedure? HOT 1
- Patchwise Overlap HOT 1
- Slicing Method HOT 2
- "Iterations" param in run_fold HOT 3
- load_csv2fold HOT 1
- patch shape HOT 2
- Error while executing download data script HOT 5
- Incompatible numpy & tensorflow & miscnn HOT 3
- Dataset HU range HOT 1
- Add Mac M1 Apple Silicon Support
- Get in email contact with authors of COVID-19 benchmark data set
- Add improved CV functionality to MIScnn HOT 1
- change license
- Citation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covid19.miscnn.