mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-09-23 07:05:27 +00:00
Simplify embedding vs linear layer code (#278)
This commit is contained in:
parent
bbe09e9799
commit
fa56c80402
@ -47,7 +47,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"PyTorch version: 2.1.0\n"
|
||||
"PyTorch version: 2.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -373,7 +373,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"linear.weight = torch.nn.Parameter(embedding.weight.T.detach())"
|
||||
"linear.weight = torch.nn.Parameter(embedding.weight.T)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user