Closed MilesCranmer closed 11 months ago
This changes from e.g.,
sum(loss(ŷ, y) for (ŷ, y) in zip(outputs, targets))
to
sum(i -> loss(outputs[i], targets[i]), eachindex(outputs, targets))
which improves speeds by ~3.5x. Fixes https://github.com/JuliaML/LossFunctions.jl/issues/172
This changes from e.g.,
to
which improves speeds by ~3.5x. Fixes https://github.com/JuliaML/LossFunctions.jl/issues/172