Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 01_pytorch_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
"end = 1\n",
"step = 0.02\n",
"X = torch.arange(start, end, step).unsqueeze(dim=1)\n",
"#y = MX + b used formula",
"ref: https://www.wallstreetmojo.com/regression-analysis-formula/ \n",
"y = weight * X + bias\n",
"\n",
"X[:10], y[:10]"
Expand Down Expand Up @@ -1658,6 +1660,8 @@
"\n",
"# Create X and y (features and labels)\n",
"X = torch.arange(start, end, step).unsqueeze(dim=1) # without unsqueeze, errors will happen later on (shapes within linear layers)\n",
"# y = MX + b used formula",
"# ref https://www.wallstreetmojo.com/regression-analysis-formula/ \n",
"y = weight * X + bias \n",
"X[:10], y[:10]"
]
Expand Down