use less ambiguous var name

This commit is contained in:
rasbt 2024-02-13 07:05:37 -06:00
parent 320f63829f
commit 231a854ae7

View File

@ -301,10 +301,10 @@
"torch.manual_seed(123)\n", "torch.manual_seed(123)\n",
"\n", "\n",
"# create 2 training examples with 5 dimensions (features) each\n", "# create 2 training examples with 5 dimensions (features) each\n",
"batch_input = torch.randn(2, 5) \n", "batch_example = torch.randn(2, 5) \n",
"\n", "\n",
"layer = nn.Sequential(nn.Linear(5, 6), nn.ReLU())\n", "layer = nn.Sequential(nn.Linear(5, 6), nn.ReLU())\n",
"out = layer(batch_input)\n", "out = layer(batch_example)\n",
"print(out)" "print(out)"
] ]
}, },
@ -492,7 +492,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"ln = LayerNorm(emb_dim=5)\n", "ln = LayerNorm(emb_dim=5)\n",
"out_ln = ln(batch_input)" "out_ln = ln(batch_example)"
] ]
}, },
{ {