From 004ebe762626c69c27a56a60c59764e20c96777b Mon Sep 17 00:00:00 2001
From: Peter Steinbach
Date: Wed, 4 Mar 2020 14:10:22 +0100
Subject: [PATCH] comment on formula for gradient values
---
tutorials/01-basics/pytorch_basics/main.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tutorials/01-basics/pytorch_basics/main.py b/tutorials/01-basics/pytorch_basics/main.py
index 744400c2..b51d914a 100644
--- a/tutorials/01-basics/pytorch_basics/main.py
+++ b/tutorials/01-basics/pytorch_basics/main.py
@@ -34,9 +34,9 @@
y.backward()
# Print out the gradients.
-print(x.grad) # x.grad = 2
-print(w.grad) # w.grad = 1
-print(b.grad) # b.grad = 1
+print(x.grad) # x.grad = 2, equivalent to dy/dx[given w,b]
+print(w.grad) # w.grad = 1, equivalent to dy/dw[given x,b]
+print(b.grad) # b.grad = 1, equivalent to dy/db[given w,x]
# ================================================================== #