mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
Merge pull request #346 from gdahia/fix-readme-toy-example
Fix README toy example incomplete `label_probs` var renaming
This commit is contained in:
commit
42b3218e90
@ -244,7 +244,7 @@ def logistic_predictions(weights, inputs):
|
||||
def loss(weights, inputs, targets):
|
||||
preds = logistic_predictions(weights, inputs)
|
||||
label_logprobs = np.log(preds) * targets + np.log(1 - preds) * (1 - targets)
|
||||
return -np.sum(label_probs)
|
||||
return -np.sum(label_logprobs)
|
||||
|
||||
# Build a toy dataset.
|
||||
inputs = np.array([[0.52, 1.12, 0.77],
|
||||
|
Loading…
x
Reference in New Issue
Block a user