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

Bugfix/random-seed-for-pytorch>=1.6 #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NamJiii
Copy link

@NamJiii NamJiii commented May 26, 2023

Hello,

I wanted to report an issue that I encountered while training on the Vimeo90k dataset using PyTorch 1.6 or higher, and I believe it to be a bug.

The problem arises from the fact that the random seed is no longer fixed with the 'random.seed(seed)' code in PyTorch versions 1.6 and later. As a result, the training process does not work as expected.

To address this issue, I propose a simple fix by adding 'torch.manual_seed(seed)' to the code. By including this line, the random seed will be properly set, leading to consistent and reliable training results.

I have tested this solution with PyTorch 2.0 and CUDA 12.0, and I can confirm that the code works flawlessly after implementing this fix.

Best regards,
Jihoon Nam

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