Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/hunkim/PyTorchZeroToAll
/ loss
Function
loss
01_basics.py:14–16 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
12
13
# Loss function
14
def
loss(x, y):
15
y_pred = forward(x)
16
return
(y_pred - y) * (y_pred - y)
17
18
# List of weights/Mean square Error (Mse) for each input
19
w_list = []
Callers
2
09_01_softmax_loss.py
File · 0.70
01_basics.py
File · 0.70
Calls
1
forward
Function · 0.70
Tested by
no test coverage detected