Skip to content
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

why different optimizer train get different result #13399

Open
1 task done
tank1530532 opened this issue Nov 5, 2024 · 2 comments
Open
1 task done

why different optimizer train get different result #13399

tank1530532 opened this issue Nov 5, 2024 · 2 comments
Labels
question Further information is requested

Comments

@tank1530532
Copy link

Search before asking

Question

pertrain weights: yolov5s.pt
dataset: coco-2017 with below classes
classes:[0:person,1:car,2:motorcycle,3:bus,4:truck]
optimizer: SGD-redline Adam-blueline

I train yolov5 model with 2 different optimizes and I got two different results . Why this two results lookes like this?

Additional

image
image

@tank1530532 tank1530532 added the question Further information is requested label Nov 5, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @tank1530532, thank you for your interest in YOLOv5 🚀! This is an automated response to help guide you, and an Ultralytics engineer will also assist soon.

For differences in training results using various optimizers like SGD and Adam, this is quite common due to the differing optimization strategies and hyperparameters inherent to each optimizer.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us diagnose the issue effectively.

For training-related inquiries, ensure your environment meets the following:

  1. Python version 3.8.0 or higher
  2. All dependencies installed via requirements.txt
  3. Check if you have CUDA and PyTorch correctly configured, especially when leveraging GPU for training.

You may want to try running on different environments or using verified setups such as Google Colab or Kaggle Notebooks, which preinstall necessary prerequisites.

Moreover, you might find our Training Tips guide useful in troubleshooting and optimizing your training results.

Lastly, we encourage you to explore our latest model YOLOv8, which may offer improved performance and features for your tasks.

Looking forward to assisting you further! 😊

@pderrenger
Copy link
Member

@tank1530532 different optimizers can lead to varying results due to their distinct approaches to adjusting learning rates and handling gradients, which can affect convergence and model performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants