Bug in Cross-Entropy Implementation inside Scholar.Linear.LogisticRegression
?
#301
Labels
bug
Something isn't working
Scholar.Linear.LogisticRegression
?
#301
I believe there is a reduction missing (probably
Nx.mean/2
) in the implementation of cross-entropy insideScholar.Linear.LogisticRegression
.scholar/lib/scholar/linear/logistic_regression.ex
Line 188 in 975938a
xs
is a tensor of shape{num_samples, num_features}
,ys
is a tensor of shape{num_samples, num_classes}
(one-hot encoded). Hence, the expression above evaluates to a tensor of shape{num_samples}
. I don't know how exactly doesPolaris
handle vectors, but I guess the loss should be a scalar.The text was updated successfully, but these errors were encountered: