Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/patrickloeber/pytorchTutorial
/ loss
Function
loss
05_1_gradientdescent_manually.py:19–20 ·
view source on GitHub ↗
(y, y_pred)
Source
from the content-addressed store, hash-verified
17
18
# loss = MSE
19
def
loss(y, y_pred):
20
return
((y_pred - y)**2).mean()
21
22
# J = MSE = 1/N * (w*x - y)**2
23
# dJ/dw = 1/N * 2x(w*x - y)
Callers
1
05_1_gradientdescent_manually.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected