ultralytics/yolov5

training stuck

passingdragon opened this issue ยท 3 comments

Search before asking

Question

I used your framework to modify yolo and define a model by myself, but when I was training, why did I get stuck at the beginning, in the position shown below
error

Additional

No response

๐Ÿ‘‹ Hello @passingdragon, thank you for your interest in YOLOv5 ๐Ÿš€! It seems like you're facing an issue with training when using a custom-defined model.

If this is a ๐Ÿ› Bug Report, could you please provide a minimum reproducible example (MRE)? This would help us understand and debug the issue much faster. Include details such as the code changes you've made, the exact command you used to start training, and a snippet of the terminal output where it gets stuck.

Additionally, confirm that your environment matches the expected requirements, particularly Python versions (>=3.8.0) and PyTorch versions (>=1.8), and that all dependencies are installed correctly.

YOLOv5 can be run in several environments, including local setups, Google Colab, Docker containers, AWS, or GCP. If relevant, let us know the environment you're using, as well as if you are leveraging a GPU for training.

This is an automated response to assist you as quickly as possible. An Ultralytics engineer will also review your issue and provide further help soon. ๐Ÿ˜Š

I can run the source code successfully, but the training gets stuck after I modify the model

@passingdragon thank you for your question. When encountering training issues after modifying the model, the problem often lies in the custom changes. Please check the following:

  1. Ensure your modified model structure aligns with the dimensions and outputs expected by YOLOv5, especially for layers like detection heads.
  2. Verify your .yaml configuration for the new model (e.g., nc for number of classes and anchors).
  3. Debug by running with --verbose to identify specific points where it stalls.
  4. Confirm that dependencies are up-to-date and test with the unmodified base model to ensure the issue is not external.

Let us know if you need further clarification or encounter specific errors!