Yolov8 not training properly when using gpu #4455
Replies: 1 comment
-
@Ziad-Assem hello! It looks like you're encountering NaN (not a number) values during training, which typically indicates that the model's loss has diverged. This can happen for several reasons, such as learning rate being too high, improper data normalization, or issues with the dataset labels. Here are a few steps you can take to troubleshoot the issue:
If you've gone through these steps and the issue persists, you might want to look into the training logs for more detailed insights or consider reaching out to the community for support. Remember, the Ultralytics documentation can be a valuable resource for understanding the expected configurations and usage patterns. Keep experimenting, and good luck with your training! 🚀 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hello, im trying to train a yolov8 model but when it's being trained, it prints nan at every parameter and the model ends up not detecting anything. please help:
output i get:
D:\Program Files\Python39\torch\optim\lr_scheduler.py:139: UserWarning: Detected call of
lr_scheduler.step()
beforeoptimizer.step()
. In PyTorch 1.1.0 and later, you should call them in the opposite order:optimizer.step()
beforelr_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-ratewarnings.warn("Detected call of
lr_scheduler.step()
beforeoptimizer.step()
. "Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 1.55it/s]
all 20 20 0 0 0 0
code i use:
from ultralytics import YOLO
import multiprocessing as mp
Load a model
model = YOLO('yolov8n.yaml') # build a new model from YAML
Train the model
if name == 'main':
# Tell Python to use the fork method to start child processes.
mp.freeze_support()
Beta Was this translation helpful? Give feedback.
All reactions