About the model_category_mapping #631
-
how to use the model_category_mapping, i found the category id of output json starts from 0 while some starts from 1. Can provide a examples for how to use it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You use category_mapping when you want to assign category names to category ids. Assume your model predicts output category ids 0, 1, 2. Assume these category ids correspond to categories 'person', 'car', 'truck'. Then you set Is it clear for you or do you still have questions? |
Beta Was this translation helpful? Give feedback.
-
Thank you。 |
Beta Was this translation helpful? Give feedback.
You use category_mapping when you want to assign category names to category ids.
Assume your model predicts output category ids 0, 1, 2. Assume these category ids correspond to categories 'person', 'car', 'truck'. Then you set
category_mapping={'0': 'person', '1': 'car', '2': 'truck'}
.Is it clear for you or do you still have questions?