mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-11-01 18:30:00 +00:00
dim-consistency
This commit is contained in:
parent
8d3e58ff81
commit
8fa64806fc
@ -1369,7 +1369,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"row_sums = masked_simple.sum(dim=1, keepdim=True)\n",
|
||||
"row_sums = masked_simple.sum(dim=-1, keepdim=True)\n",
|
||||
"masked_simple_norm = masked_simple / row_sums\n",
|
||||
"print(masked_simple_norm)"
|
||||
]
|
||||
@ -2027,7 +2027,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.6"
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user