Simplify embedding vs linear layer code (#278)

This commit is contained in:
Sebastian Raschka 2024-07-21 10:21:10 -07:00 committed by GitHub
parent bbe09e9799
commit fa56c80402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"PyTorch version: 2.1.0\n" "PyTorch version: 2.3.1\n"
] ]
} }
], ],
@ -373,7 +373,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"linear.weight = torch.nn.Parameter(embedding.weight.T.detach())" "linear.weight = torch.nn.Parameter(embedding.weight.T)"
] ]
}, },
{ {