Closed veronicatorcolacci closed 4 years ago
@veronicatorcolacci Can you follow the link for converting the model to TF Lite model and see if it helps you.Thanks!
It has been 15 days with no activity and the awaiting response
label was assigned. Is this still an issue?
@veronicatorcolacci
Any update on this issue please. Thanks!
Not anymore... You can close it
Il gio 27 feb 2020, 02:02 Alfred Sorten Wolf notifications@github.com ha scritto:
It has been 15 days with no activity and the awaiting response label was assigned. Is this still an issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/36548?email_source=notifications&email_token=AOPLYHDNSWM5XP4F54P2EHTRE4GKLA5CNFSM4KRRL5K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENCPUOI#issuecomment-591723065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPLYHGVWF7TYXWQCRJHVHDRE4GKLANCNFSM4KRRL5KQ .
Closing the issue since its resolved. Thanks!
System information
Hi, I'm a student at the University of Bologna ( Italy) and I'm using the Google Coral USB accelerator for my thesis. I realized a keras neural network that classifies my data in four classes and the accuracy I get is roughly 97%. I performed a full integer post- training quantization since keras networks don't support quantization-aware training. I followed the guide on TensorFlow site but I had problems running inference on the edge tpu . In particular my network undergoes an accuracy loss when the model is converted to a
tensorflowlite
one ( the accuracy drops to roughly the 25%) . This is due to quantization since thetensorflowlite
model without quantization that runs on my pc is not affected by the conversion. I tried to scale my input data in a range [0, 255] withMinMaxScaler
but in this case , even if the accuracy of thetensorflowlite
quantized model matches the one of the not converted one , the results are not satisfactory since the accuracy of the network itself is low. I wonder if you could help me solve this problem. Perhaps the values on my dataset are too low and the quantization fails to convertfloat32
intouint8
without information loss. Below you'll find my python code.My input train dataset is part of csv files and it's a matrix of dimensions = (1756,30) and my input test one is a matrix of (183,30). This is how the data looks like (first two rows):
P.S. I'm using the TensorFlow 2.0 version. I read that there could be problems with this version during the conversion phase but , as you can see in the code, I used a converter compatible with the previous version
(converter=tf.compat.v1.lite.TFliteConverter.from_keras_model_file())
. I also tried to use the downgraded version of TensorFlow( v 1.15) in my code but it didn't make any difference.