Merge pull request #9 from xiaotian0328/patch-1

Fix typos in ch03.ipynb
This commit is contained in:
Sebastian Raschka 2023-12-27 08:28:52 +01:00 committed by GitHub
commit 0f83b87c04

View File

@ -306,7 +306,7 @@
"attn_weights_2 = torch.softmax(attn_scores_2, dim=0)\n",
"\n",
"print(\"Attention weights:\", attn_weights_2)\n",
"print(\"Sum:\", attn_weights.sum())"
"print(\"Sum:\", attn_weights_2.sum())"
]
},
{
@ -527,7 +527,7 @@
}
],
"source": [
"all_context_vecs = attn_scores @ inputs\n",
"all_context_vecs = attn_weights @ inputs\n",
"print(all_context_vecs)"
]
},