Update notebook.

- Indent loss calculation for test data in the 1st training loop
so it is under inference mode.
- Add general notes in "notes" directory.
This commit is contained in:
Ben Eyal committed 2022-02-10 22:05:11 +02:00
1 parent fe212757e2
commit 757c45ee23
2 files changed
+364 -359

No files matched your search

+359 -359
View File
File diff suppressed because it is too large. Load diff
+5
View File
@@ -0,0 +1,5 @@
# Notes
1. In `LinearRegressionModel`, the `requires_grad` and `dtype` parameters to `torch.randn` are redundant, as `nn.Parameter` takes care of setting them.
2. Again in `LinearRegressionModel`, the `forward` function calculates $w \cdot x + b$, but in the previous notebook, you introduced the linear function in its general form, $x \cdot A^{T} + b$. Since this example is using vectors, it doesn't matter, but it might be worth to note this difference.