Skip to content

Weights are never passed for cross entropy in binary classification #92

Closed
@ravinkohli

Description

Currently, to assign weights to the loss function, we are checking the output type, and if its binary we are making a kwargs dict with 'pos_weight': weights. This assumes that for binary classification the loss function is BCEWithLogitsLoss. However, that is not the case as by default we are using CrossEntropyLoss for binary classification and therefore the weights are never passed to this loss function.

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions