Skip to content
Snippets Groups Projects

Replace sampler balancing by loss balancing

Merged Daniel CARRON requested to merge loss-balancing into main

This MR removes balancing of the training sampler and replaces it by loss balancing, if the loss function allows it (= contains a pos_weight parameter). Binary and exclusive, multi-class targets are supported. Using a database with multi-class, non-exclusive targets will raise a NotImplementedError for now.

Models now expect the class and arguments of the loss used instead of an instance, just like it is done with the optimizer. It is instantiated in trainer.py::run() and balanced if possible.

A base Model class has been created that other models should inherit from.

closes #6 (closed)

Edited by Daniel CARRON

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading