Training returns NaN loss when switching from YOLOv8 to YOLOv12 #20083
Replies: 1 comment 9 replies
-
👋 Hello @lansimtech, thank you for your interest in Ultralytics 🚀! We're thrilled to see you exploring YOLO12. Your feedback is valuable, and your issue deserves attention. If this is a 🐛 Bug Report, please provide a minimum reproducible example (MRE), including relevant code snippets and details about your environment (e.g., Python version, hardware, and dependencies), to help us debug effectively. If this is a ❓ Question regarding custom training, please share additional details, such as dataset examples, training logs, and any modifications you've made to the default configuration. This information will help us better understand and address the NaN loss issue you're encountering. An Ultralytics engineer will review your issue and provide further assistance soon. In the meantime, ensure you're using the latest version of the Thank you for being a part of the Ultralytics community! If you have further questions or updates, feel free to share them here. 😊 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thank you for your great work on YOLO!
I trained my own dataset successfully using YOLOv8 without any issues. However, when I switch to YOLOv12 and try to train the same dataset, the training loss becomes NaN after a few epochs.
I suspect it might be related to the new architecture or specific layers (e.g., A2C2f), but I would really appreciate if you could provide some insights or guidance on what might be causing the NaNs in YOLOv12.
Any help would be appreciated. Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions