ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
49.6k stars 16.1k forks source link

Error I encountered during training on Colab #13080

Closed FatmaDikmen closed 1 month ago

FatmaDikmen commented 3 months ago

Search before asking

Question

I'm getting an error when I run this code block: !python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --weights yolov5x.pt --cache The error is: Traceback (most recent call last): File "/content/gdrive/MyDrive/train.py", line 39, in from classify import val as validate ImportError: cannot import name 'val' from 'classify' (/usr/local/lib/python3.10/dist-packages/classify/init.py) I have the val function in my classify file. Why am I getting this error?

Additional

I am training data I got from Kaggle with yolov5 on Colab

glenn-jocher commented 3 months ago

@FatmaDikmen hello,

Thank you for reaching out and providing details about the error you're encountering. Let's work together to resolve this issue.

Firstly, to ensure we can effectively investigate and reproduce the problem, could you please provide a minimum reproducible code example? This will help us understand the context and pinpoint the issue more accurately. You can refer to our guide on creating a minimum reproducible example here: Minimum Reproducible Example.

Additionally, please verify that you are using the latest versions of both torch and the YOLOv5 repository. You can update your packages using the following commands:

!pip install --upgrade torch
!git clone https://github.com/ultralytics/yolov5  # if you haven't already cloned the repo
!cd yolov5 && git pull  # to update to the latest version

Once you've ensured that everything is up to date, please try running your code again. If the issue persists, kindly share the updated code and any additional details that might help us diagnose the problem.

Looking forward to your response so we can assist you further!

github-actions[bot] commented 2 months ago

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐