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

Question in torch_utils.py #18

Closed
VvvvvGH opened this issue Jun 5, 2020 · 2 comments
Closed

Question in torch_utils.py #18

VvvvvGH opened this issue Jun 5, 2020 · 2 comments

Comments

@VvvvvGH
Copy link

VvvvvGH commented Jun 5, 2020

I found something wired when I am looking at torch_utils.py.
If you want to reduce randomness, shouldn't do as pytorch document suggested to set torch.backends.cudnn.deterministic = True and
torch.backends.cudnn.benchmark = False ?

def init_seeds(seed=0):
torch.manual_seed(seed)
# Reduce randomness (may be slower on Tesla GPUs) # https://pytorch.org/docs/stable/notes/randomness.html
if seed == 0:
cudnn.deterministic = False
cudnn.benchmark = True

@glenn-jocher
Copy link
Member

@VvvvvGH yes you are correct. The comment is incorrect, the settings are coded for the fastest training.

@glenn-jocher
Copy link
Member

This should be resolved in 22d6088 now (incorrectly labelled as a #17 fix).

Default training seed changed to 1 now as part of changes.

GiuliaCiaramella pushed a commit to GiuliaCiaramella/yolov5 that referenced this issue Apr 14, 2021
manole-alexandru added a commit to manole-alexandru/yolov5-uolo that referenced this issue Apr 16, 2023
manole-alexandru added a commit to manole-alexandru/yolov5-uolo that referenced this issue Apr 20, 2023
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

No branches or pull requests

2 participants