We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
div_term = torch.exp(torch.arange(0, d_model, 2) * -(math.log(10000.0) / d_model)) 计算分母的时候为什么先对数运算后指数运算,这样不麻烦吗?完全可以直接: div_term = 1 / 10000 ** (torch.arange(0, d_model, 2) / d_model)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
div_term = torch.exp(torch.arange(0, d_model, 2) * -(math.log(10000.0) / d_model))
计算分母的时候为什么先对数运算后指数运算,这样不麻烦吗?完全可以直接:
div_term = 1 / 10000 ** (torch.arange(0, d_model, 2) / d_model)
The text was updated successfully, but these errors were encountered: