ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
138 stars 14 forks source link

About how to increase the number of epochs. #783

Open suzu-asuka opened 3 months ago

suzu-asuka commented 3 months ago

Search before asking

Question

I apologize for the inconvenience, but thank you for your understanding.The number of epochs for deep learning stops at 100. What can I do to increase the number of times I study? thank you

Additional

No response

github-actions[bot] commented 3 months ago

👋 Hello @suzu-asuka, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:

If this is a 🐛 Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.

If this is a ❓ Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.

We try to respond to all issues as promptly as possible. Thank you for your patience!

pderrenger commented 3 months ago

@suzu-asuka hello!

Thank you for reaching out and for your thorough search before asking your question. Increasing the number of epochs in your training process is quite straightforward. You can adjust the number of epochs in your training configuration file or script.

If you are using a YAML configuration file, you can set the epochs parameter like this:

# training configuration
epochs: 200  # set this to your desired number of epochs

If you are using a Python script to run your training, you can set the epochs parameter in the train function call:

from ultralytics import YOLO

# Load a model
model = YOLO('yolov5s.pt')

# Train the model
model.train(data='coco128.yaml', epochs=200)  # set this to your desired number of epochs

Make sure you have the latest version of the Ultralytics packages to avoid any potential issues. You can update your packages using:

pip install --upgrade ultralytics

If you encounter any further issues or have additional questions, feel free to ask. Happy training! 😊

sergiuwaxmann commented 3 months ago

@suzu-asuka You can also customize the number of epochs using Ultralytics HUB's UI: https://docs.ultralytics.com/hub/models#2-model