-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the GPU device? #45
Comments
Use the following command to train a model with GPU:1
|
@yuxumin OK. Thanks. But when I change into GPU:1, I still met the OOM when running the command: bash ./scripts/train.sh 2 --config ./cfgs/PCN_models/GRNet.yaml --exp_name example init.py", line 22, in forward It seems that the code still run on GPU: 0 ? I'm not sure. |
The code in train.sh is
And this will put the model and data on GPU:2 |
@yuxumin OK. I see. I try to run other GPU Cluster nodes, but I met an error like this: anaconda3/envs/pytorch-PoinTr/lib/python3.7/site-packages/knn_cuda/init.py", line 15, in load_cpp_ext I use cuda11.1 and pytorch==1.8.0, it seems that the GPU is not available now. |
@yuxumin Which file to change batchsize of GRNet.yaml and TopNet.yaml? |
This code means to use the config file in |
@yuxumin Is this: total_bs : 32 in cfgs/PCN_models/GRNet.yaml to change the batch size, right? |
yes |
@yuxumin I have change it into 2, the OOM still occurs. |
GRNet requires to calculate gridding loss during the training, which takes a lot of memory of GPU. Can you try to train other models, rather than GRNet |
Close it since no response. Feel free to re-open it if problems still exist |
Hi, how to change the GPU device in the code? The default is GPU:0.
The text was updated successfully, but these errors were encountered: