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

Switch from functional to class losses #43

Merged
merged 7 commits into from
Apr 7, 2023
Merged

Switch from functional to class losses #43

merged 7 commits into from
Apr 7, 2023

Conversation

andrrizzi
Copy link
Collaborator

@andrrizzi andrrizzi commented Apr 6, 2023

Description

Changes the CV classes to use by default a loss function object.

It is still possible to assign loss_fn to a (lambda) function, although I had to override __setattr__ to work around some weird PyTorch magic (hopefully the comments I left in the code makes it clear).

Status

  • Ready to go

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #43 (969634a) into lightning (39902dc) will not change coverage.
The diff coverage is 0.00%.

@luigibonati
Copy link
Owner

thank you @andrrizzi! this sounds good to me, shall we merge it?

@andrrizzi
Copy link
Collaborator Author

Great, thanks! Merging then.

@andrrizzi andrrizzi merged commit 0ca644c into lightning Apr 7, 2023
@andrrizzi andrrizzi deleted the loss-class2 branch April 7, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants