Update 01_pytorch_workflow.ipynb

added ref with formula
This commit is contained in:
Nipu Chakraborty authored and GitHub committed 2023-05-18 10:55:58 +06:00
1 parent c7e1b2e6a7
commit 65d92c1816
1 file changed
+4 -2
+4 -2
View File
@@ -220,7 +220,8 @@
"end = 1\n",
"step = 0.02\n",
"X = torch.arange(start, end, step).unsqueeze(dim=1)\n",
"#Y_i=f(X_i, \beta)+e_i",
"#y = MX + b used formula",
"ref: https://www.wallstreetmojo.com/regression-analysis-formula/",
"y = weight * X + bias\n",
"\n",
"X[:10], y[:10]"
@@ -1659,7 +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_i=f(X_i, \beta)+e_i",
"# y = MX + b used formula",
"# ref https://www.wallstreetmojo.com/regression-analysis-formula/",
"y = weight * X + bias \n",
"X[:10], y[:10]"
]