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