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

Gumbel噪声的计算会出现-inf #26

Closed
wangxin211 opened this issue Jan 27, 2024 · 1 comment
Closed

Gumbel噪声的计算会出现-inf #26

wangxin211 opened this issue Jan 27, 2024 · 1 comment

Comments

@wangxin211
Copy link

在AutoCF代码中计算Gumble噪声时,会计算出-inf,进而导致infoloss的值变为inf
image

@Re-bin
Copy link
Collaborator

Re-bin commented Jan 27, 2024

嗨,感谢关注👋

谢谢指正,可以尝试一下把42行替换成

noise = t.rand(scores.shape).cuda()
noise[noise == 0] = 1e-8

这样避免sample到0的情况,应该能解决问题 :)

Best regards,
Xubin

@HKUDS HKUDS closed this as completed Feb 14, 2024
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

3 participants