Update ch03.ipynb

This commit is contained in:
Xiaotian Ma
2023-12-26 22:05:21 -06:00
committed by GitHub
parent 727615423d
commit c518adb0b7

View File

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