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
File: Codes/ch03/01_main-chapter-code/ch03.ipynb
CausalAttention 类中的forward方法,对注意力分数进行softmax的部分有问题:
这里如果设置为dim=1,就不能处理批次情况了。在输入的形状为[batch_size, num_tokens, d_in] 时,attn_scores的形状为[batch_size, num_tokens, num_tokens],此时应该是在dim=2上进行softmax才是正确吧,所以应该为dim=-1。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
File: Codes/ch03/01_main-chapter-code/ch03.ipynb
CausalAttention 类中的forward方法,对注意力分数进行softmax的部分有问题:
这里如果设置为dim=1,就不能处理批次情况了。在输入的形状为[batch_size, num_tokens, d_in] 时,attn_scores的形状为[batch_size, num_tokens, num_tokens],此时应该是在dim=2上进行softmax才是正确吧,所以应该为dim=-1。
The text was updated successfully, but these errors were encountered: