MCPcopy
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
14def 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
19w_list = []

Callers 2

01_basics.pyFile · 0.70

Calls 1

forwardFunction · 0.70

Tested by

no test coverage detected