问题
I trained a model to convert sketch picture to color picture. enter image description here middle is ground truth, left is original and right is pridiction. This result was ran by model.h5 but there is a wrong result when i run program using model.tflite.
this is my convert code
tflite_convert --keras_model_file=G:/pix2pix/generator.h5 --output_file=G:/pix2pix/convert.tflite
this is the result ran by model.tflite
[[[[nan nan nan] ...
回答1:
I find a solution about this question. Just change the attribute fused of tf.keras.layers.bn to false. The output is correct.
来源:https://stackoverflow.com/questions/60513183/a-problem-when-run-tflite-modelthe-result-of-tflite-model-is-nan