mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Compare commits
5
Commits
main
...
ca7d60a922
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca7d60a922 | ||
|
|
16758d69af | ||
|
|
65d92c1816 | ||
|
|
c7e1b2e6a7 | ||
|
|
3a52b6f9f1 |
@@ -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]"
|
||||
@@ -1650,6 +1652,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]"
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user