blue-oil / blueoil

Bring Deep Learning to small devices
https://blueoil.org
Apache License 2.0
248 stars 86 forks source link

Wrong naming of predicted class directory in prediction of classification task #735

Open lm-jira opened 4 years ago

lm-jira commented 4 years ago

Because prediction["probability"] stores values of probability in string type, not float when finding the highest probability with the code below, it will find that value like 3.4567e-05is greater than 0.9999 and results in wrong name of the predicted class.

https://github.com/blue-oil/blueoil/blob/446f9eb362cc863ea05914c2228252c113117fa7/lmnet/lmnet/utils/predict_output/output.py#L222

To solve it, I think the code below should convert probability to float.

https://github.com/blue-oil/blueoil/blob/446f9eb362cc863ea05914c2228252c113117fa7/lmnet/lmnet/utils/predict_output/output.py#L221

lm-jira commented 4 years ago

@iizukak I found a simple bug described above. Is it okay for me to create PR by myself and ask for your review?

iizukak commented 4 years ago

@lm-jira Of course. You can create PR anytime!!