Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AverageLoss #110

Open
tlienart opened this issue Jan 10, 2022 · 0 comments
Open

Use AverageLoss #110

tlienart opened this issue Jan 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tlienart
Copy link
Collaborator

By the way, when I started working on this PR I considered for a moment an alternative implementation with a wrapper

struct AverageLoss{L} <: Loss
    loss::L
end

(al::AverageLoss)(x::AVR, y::AVR) = al.loss(x, y)/length(y)

I found this pretty neat, but it would have required some major refactoring, mostly because of the parametric dispatch on glr for _solver, _fit etc. Are all these type restrictions really needed? Or could one get rid of them, maybe with a few traits?

But I am also fine with the current implementation. Please feel free to merge whenever you feel this PR is ready.

Originally posted by @jbrea in #109 (comment)

@tlienart tlienart added the enhancement New feature or request label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant