From 6a4d0a1022ca9e99fdffdf038101162b39bcd38d Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Sat, 28 Jun 2025 10:07:16 -0500 Subject: [PATCH] Fix d_out code comment in bonus materials (#715) --- .../mha-implementations.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb b/ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb index 077cc1d..240e79b 100644 --- a/ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb +++ b/ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb @@ -689,7 +689,7 @@ " def __init__(self, d_in, d_out, num_heads, context_length, dropout=0.0, qkv_bias=False):\n", " super().__init__()\n", "\n", - " assert d_out % num_heads == 0, \"embed_dim is indivisible by num_heads\"\n", + " assert d_out % num_heads == 0, \"d_out is indivisible by num_heads\"\n", "\n", " self.num_heads = num_heads\n", " self.context_length = context_length\n", @@ -1002,7 +1002,7 @@ " def __init__(self, d_in, d_out, num_heads, context_length, dropout=0.0, qkv_bias=False):\n", " super().__init__()\n", "\n", - " assert d_out % num_heads == 0, \"embed_dim is indivisible by num_heads\"\n", + " assert d_out % num_heads == 0, \"d_out is indivisible by num_heads\"\n", "\n", " self.num_heads = num_heads\n", " self.context_length = context_length\n",