Added pos_weight and weight to BertDataBunch constructor and to from_pretrained_model of BertLearner class, initializing said attributes of multilabel classifiers in model_class. Passed attributes to BCEWithLogitsLoss instantiations in modeling multilabel classification class forward functions.
Accuracy and confusion matrix observed in non multilabel run with master branch using sample weighting scheme with custom sampler but no pos_weights or weights parameter consistent with prior runs.
Implementation of class weight demonstrated improved accuracy and precision over sample weighting.
Added pos_weight and weight to BertDataBunch constructor and to from_pretrained_model of BertLearner class, initializing said attributes of multilabel classifiers in model_class. Passed attributes to BCEWithLogitsLoss instantiations in modeling multilabel classification class forward functions.
Accuracy and confusion matrix observed in non multilabel run with master branch using sample weighting scheme with custom sampler but no pos_weights or weights parameter consistent with prior runs.
Implementation of class weight demonstrated improved accuracy and precision over sample weighting.