Feature Request: adding class_weights to tfLite Model Maker #48703
Labels
comp:lite-support
Lite support library related issues
TFLiteModelMaker
TFLite Model Maker related issues
type:feature
Feature requests
Description of issue (what needs changing):
It would be great if somebody could add class_weights to the
model maker
.create() arguments because it's pretty common to work with imbalanced datasets in real life. I'm trying to retrain a model with model maker for image classification and have about 15 labels with very different balances in classes. I'm trying to change the code myself and hoping to do a pull request but I can't my code to work.Clear description
For example, why should someone use this method? How is it useful?
Many datasets are imbalanced and having class_weights in the .create() method will help a lot to tackle that issue.
Correct links
https://github.com/tensorflow/examples/tree/master/tensorflow_examples/lite/model_maker/core/task
Parameters defined
Description which could be added.
class_weight: : Optional dictionary mapping class indices (integers) to a
weight (float) value, used for weighting the loss function
(during training only). This can be useful to tell the model to
"pay more attention" to samples from an under-represented class.
Are you planning to also submit a pull request to fix the issue? See the docs
I'm trying to fix it myself and would like to do a pull request but my build never works after I changed the code. I've been trying to fix it for a while and finally just figured I should see if somebody else knows how to do it.
The text was updated successfully, but these errors were encountered: