expanded class_weight dimension fix