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

每次运行的结果有波动。 #78

Open
zhiyuexuejava opened this issue Nov 28, 2024 · 0 comments
Open

每次运行的结果有波动。 #78

zhiyuexuejava opened this issue Nov 28, 2024 · 0 comments

Comments

@zhiyuexuejava
Copy link

我在模型加载前已经设置了一些列随机种子,如下:
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
但是经过训练,我发现多次训练,相同的epoch的结果都有波动,同样的我更改为macbert,是没有这种问题的。
我的硬件环境是一致的,在一张a100上。
请问这个问题如何解决

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

1 participant