Robust-Lane-Detection
Robust-Lane-Detection copied to clipboard
CUDA out of memory.
/root/data/anaconda3/envs/py36/lib/python3.6/site-packages/torch/optim/lr_scheduler.py:100: UserWarning: Detected call of lr_scheduler.step()
before optimizer.step()
. In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step()
before lr_scheduler.step()
. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
Traceback (most recent call last):
File "train.py", line 132, in
I have a 16GB GPU, but I keep getting this error. I was wondering how you trained on two GPUs. By the way, I am using Pytorch 1.3.1. Thanks for your help!
The releaased code is running on Pytorch0.4.0. If adapted to Pytorch1.1.0 or above, optimizer.step()' should be before
lr_scheduler.step()'.
For the problem of out of memory, you may have to set a smaller batch size.
Thank you for your answer. I have set the batch size to 3, but it still didn't work. It really confused me that a 16GB GPU was out of memory. As I know, Pytorch won't take multi-GPU itself. Can you please tell me how did you do that? Thank you so much!
I found I forgot to resize the image causing to the memory problem. However, I face another problem.
Traceback (most recent call last):
File "c:/Users/10806337/Desktop/PortableGit/Projects/Robust-Lane-Detection/LaneDetectionCode/train.py", line 122, in
Do you have any idea of it?
I have solved my problem. I accidentally add torch.no_grad(): before the training loop. But I found one bug in the code that is in train(): loss = criterion(output, target) should be loss = criterion(output[0], target)
Do you get the results?