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

Support multiple choice datasets #179

Merged
merged 54 commits into from
Apr 16, 2023
Merged

Support multiple choice datasets #179

merged 54 commits into from
Apr 16, 2023

Conversation

norabelrose
Copy link
Member

No description provided.

norabelrose and others added 30 commits April 4, 2023 11:28
@norabelrose norabelrose marked this pull request as ready for review April 14, 2023 07:27
fix typo in comment
@@ -85,7 +84,9 @@ def fit(
num_classes = self.linear.out_features
loss_fn = bce_with_logits if num_classes == 1 else cross_entropy
loss = torch.inf
y = y.float()
y = y.to(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why long for > 1 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F.cross_entropy wants integer labels whereas F.binary_cross_entropy_with_logits wants float labels, they're inconsistent

@norabelrose norabelrose merged commit b702eda into main Apr 16, 2023
@norabelrose norabelrose deleted the multiclass branch April 16, 2023 17:55
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.

None yet

3 participants