Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 18, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refined random seed initialization for better reproducibility and performance control.

πŸ“Š Key Changes

  • Removed init_torch_seeds function from utils/torch_utils.py.
  • Included random seed initialization directly in init_seeds within utils/general.py.
  • Added control over CUDA's cuDNN benchmarking and determinism settings based on the seed value.

🎯 Purpose & Impact

  • Ensures that users have consistent behavior when setting the seed for reproducibility purposes.
  • By adjusting cuDNN settings, users can now choose between faster execution with less reproducibility and slower execution with more reproducibility, useful for debugging or production environments.
  • Simplifies the codebase by removing redundant functions, potentially making it easier for users to understand and maintain the initialization process.

@glenn-jocher glenn-jocher merged commit 84bfa89 into master Sep 18, 2021
@glenn-jocher glenn-jocher deleted the update/init_seeds branch September 18, 2021 11:28
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant