Fix and re-enable three tests under LossWeightingTest in training_test.py.
These tests share the same assertion: that weighting a particular class's loss over other classes (by passing in `sample_weight` into `model.fit`) leads to a lower evaluation loss when evaluating test data limited to that class compared to evaluating all test data. My theory is that the models in these tests are not trained enough for that assumption to always hold true, which is why they are flaky. Increased the weight from 2 to 10 and the training epochs from 5 to 10. PiperOrigin-RevId: 225218063
Loading
Please sign in to comment