Home > other >  Tf model transformation tf. Lite error
Tf model transformation tf. Lite error

Time:09-24

The import tensorflow as tf
The import pathlib
Print (tf) __version__)
ModelDir='1/model/'
The converter=tf. Lite. TFLiteConverter. From_saved_model (modelDir)
The converter. Optimizations=[tf. Lite. Optimize. OPTIMIZE_FOR_SIZE]
Tflite_model=converter can convert ()
Tflite_model_file=pathlib. Path (' model/model. Tflite ')
Tflite_model_file. Write_bytes (tflite_model)



Traceback (the most recent call last) :
The File "D:/newTf tfLite. Py", line 22, in & lt; module>
Tflite_model=converter can convert ()
The File "C: \ Users \ \ Anaconda3 \ envs 86182 \ newtf \ lib \ site - packages \ tensorflow \ \ lite lite \ python py", line 392, in the convert
* * converter_kwargs)
File "C: \ Users \ \ Anaconda3 \ envs 86182 \ newtf \ lib \ site - packages \ tensorflow \ lite \ python \ convert py", line 404, in toco_convert_impl
Input_data. SerializeToString ())
File "C: \ Users \ \ Anaconda3 \ envs 86182 \ newtf \ lib \ site - packages \ tensorflow \ lite \ python \ convert py", line 172, in toco_convert_protos
"TOCO failed. See the console for the info. \ n \ n \ n % s % s" % (stdout and stderr))
Tensorflow. Lite. Python. Convert. ConverterError: TOCO failed. See the console for the info.
B "' toco_from_protos \ sets \ XBB \ xca \ xc7 \ xc4 \ xda \ sets \ XBF \ XBB \ xf2 \ XCD \ xe2 \ sets \ XBF \ xc3 \ XFC \ xc1 \ xee \ xa3 \ xac \ xd2, sets, sets, XBB \ xca \ xc7 \ XBF \ xc9 \ xd4 \ XCB \ xd0 \ xd0 \ xb5 \ xc4 \ xb2 \ XCC \ xd0 \ xf2 \ r \ n \ XBB \ xf2 \ xc5 \ xfa \ xb4 \ xa6 \ xc0 \ xed \ xce \ xc4 \ XBC \ xfe \ xa1 \ xa3 \ r \ n"

In the process of using saved_model in converting tensorflow. Lite, the converter. The convert () has been an error, I am using tensorflow version 2.0.0, 1.14.0, 1.15.0 are tried, always following the same mistakes, do not know to have predecessors met, help solve, thank you very much,
  • Related