Replace sampler balancing by loss balancing
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