Răsfoiți Sursa

align formulas in notes with code (#605)

Sebastian Raschka 7 luni în urmă
părinte
comite
3654571184
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      ch03/01_main-chapter-code/ch03.ipynb

+ 3 - 3
ch03/01_main-chapter-code/ch03.ipynb

@@ -797,9 +797,9 @@
     "- Implementing the self-attention mechanism step by step, we will start by introducing the three training weight matrices $W_q$, $W_k$, and $W_v$\n",
     "- These three matrices are used to project the embedded input tokens, $x^{(i)}$, into query, key, and value vectors via matrix multiplication:\n",
     "\n",
-    "  - Query vector: $q^{(i)} = W_q \\,x^{(i)}$\n",
-    "  - Key vector: $k^{(i)} = W_k \\,x^{(i)}$\n",
-    "  - Value vector: $v^{(i)} = W_v \\,x^{(i)}$\n"
+    "  - Query vector: $q^{(i)} = x^{(i)}\\,W_q $\n",
+    "  - Key vector: $k^{(i)} = x^{(i)}\\,W_k $\n",
+    "  - Value vector: $v^{(i)} = x^{(i)}\\,W_v $\n"
    ]
   },
   {