-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Yolov8 NotImplementedError with GPU #12843
Comments
👋 Hello @erahaman, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results. Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users. InstallPip install the pip install ultralytics EnvironmentsYOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit. |
Hello! Thanks for reaching out and providing detailed information. It seems like you've encountered a Here are a couple of steps you can try to resolve this issue:
If these steps do not resolve the issue, it might be helpful to provide the full traceback of the error, as the screenshot link seems to be broken. This will help in diagnosing the problem more accurately. Let us know how it goes! |
I still have the same problem I deleted cuda, pytorch and pyhton and reinstalled everything and still get the same problem I tried this code: device = 'cuda' if torch.cuda.is_available() else 'cpu' and I got this error: TypeError: YOLO.init() got an unexpected keyword argument 'device'` I tried the original code again and this is the error: `NotImplementedError Traceback (most recent call last) File c:\Users\eraha\AppData\Local\Programs\Python\Python310\lib\site-packages\ultralytics\engine\model.py:674, in Model.train(self, trainer, **kwargs) File c:\Users\eraha\AppData\Local\Programs\Python\Python310\lib\site-packages\ultralytics\engine\trainer.py:199, in BaseTrainer.train(self) File c:\Users\eraha\AppData\Local\Programs\Python\Python310\lib\site-packages\ultralytics\engine\trainer.py:313, in BaseTrainer._do_train(self, world_size) |
Hello! It looks like you're encountering a from ultralytics import YOLO
import torch
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model = YOLO("yolov8m.yaml").to(device)
model.train(data="yolo_con.yaml", epochs=100) For the If the problem persists, please ensure that your environment is correctly set up and that all dependencies are compatible with each other. If you can provide more details about when the error occurs during the training process, it might help in diagnosing the issue further. 🛠️ |
Search before asking
YOLOv8 Component
Train
Bug
I have used Yolov8 to train my dataset with the CPU and it went great when I wanted to use GPU and train another dataset it's giving me NotImplementedError. i have set up cuda and pytroch and they are defined without any problems, How could I fix it. Please help me. Thank you
here is the error:
Environment
Ultralytics YOLOv8.2.18 Python-3.11.4 torch-2.3.0+cu121 CUDA:0 (NVIDIA GeForce RTX 3070 Laptop GPU, 8192MiB)
Setup complete (16 CPUs, 15.7 GB RAM, 22.9/64.0 GB disk)
Minimal Reproducible Example
from ultralytics import YOLO
model = YOLO("yolov8m.yaml")
model.train(data="yolo_con.yaml", epochs=100)
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: