Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/patrickloeber/pytorchTutorial
/ loss
Function
loss
05_2_gradientdescent_auto.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
print(f
'Prediction before training: f(5) = {forward(5).item():.3f}'
)
23
Callers
4
06_2_model_loss_and_ optimizer.py
File · 0.70
11_softmax_and_crossentropy.py
File · 0.70
05_2_gradientdescent_auto.py
File · 0.70
06_1_loss_and_optimizer.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected