Comments (3)
If you have 3 GPUs, then they will be indexed as 0, 1, 2
, not 1, 2, 3
. So, you should use CUDA_VISIBLE_DEVICES=1,2
to use last two. Adding -d 1,2
to the command does the same thing.
But I don't understand why does it use GPU:0 (not 2) too, and this problem is not being reproduced in my machines.
Can you try python train.py -c config.json -d 1,2
and tell me how it goes?
from pytorch-template.
Someone is using gpu 0, and I wanted to use 1 and 2.
when i set gpu option with the -d option that you told, i do not get an error.
but i wonder why work when set device index from args.device to os.environ["CUDA_VISIBLE_DEVICES"] in train.py. but CUDA_VISIBLE_DEVICES=2,3 is not working. i think it's same operator.
thank you.
from pytorch-template.
but this solution make error.
because tensor use "cuda:0".
so data parallel module is occur error following.
File "/home/yjk931004/anaconda2/envs/mypython3/lib/python3.7/site-packages/torch/nn/parallel/_functions.py", line 54, in forward
assert all(map(lambda i: i.is_cuda, inputs))
from pytorch-template.
Related Issues (20)
- Loss function HOT 1
- Any plans to support Wandb Hyperparameter Searching?
- Strange bugs occur when the number of Gpus trained and tested is inconsistent
- usage of shuffle=True when using SubsetRandomSampler HOT 1
- TODO: also configure logging for sub-processes(not master) HOT 4
- DataLoader example
- python train.py --resume path/to/checkpoint HOT 1
- Save best model HOT 1
- Model is moved to GPU after the optimizer is instatiated, resulting in a performance hit. HOT 4
- Setting 'early_stop: 0' does not disable it HOT 2
- Passing an iterable from config.json HOT 2
- Add custom flag & override from CLI HOT 1
- Some features I have implemented.
- ReduceLROnPlateau lr_scheduler HOT 3
- Only `data_loader.data_loaders` is plural HOT 5
- Any support for multiple loss functions? HOT 5
- Latest checkpoint HOT 8
- Some thing wrong with add_histogram function HOT 2
- Adding mesh to Tensorboard not working via TensorboardWriter HOT 2
- Any plans to support DistributedDataParallel? HOT 2
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 pytorch-template.