Skip to content
Discussion options

You must be logged in to vote

👋 Hello! Thanks for asking about training reproducibility. YOLOv5 🚀 uses a single training seed which is set here using the init_seeds() function. CPU and Single-GPU trainings should be fully reproducible with torch>=1.12.0. Multi-GPU DDP trainings are still not reproducible unfortunately. This is an open issue for us and we could use any help in tracking down this problem.

yolov5/train.py

Line 104 in 7215a0f

init_seeds(opt.seed + 1 + RANK, deterministic=True)

This function sets python, numpy and torch seeds and updates cudnn settings:

yolov5/utils/general.py

Lines 198 to 214 in 7215a0f

def init_seeds(seed=0, deterministic=False):
# Initialize random num…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@RudikAleksandr
Comment options

@glenn-jocher
Comment options

Answer selected by RudikAleksandr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants