I want to export tflite model and than run python3 ./DeepSpeech.py --checkpoint_dir=models/v10/checkpoint --export_dir=models/v10 --export_tflite
and i get Error :
I Exporting the model…
I Loading best validating checkpoint from models/v10/checkpoint/best_dev-196993
I Loading variable from checkpoint: cudnn_lstm/rnn/multi_rnn_cell/cell_0/cudnn_compatible_lstm_cell/bias
I Loading variable from checkpoint: cudnn_lstm/rnn/multi_rnn_cell/cell_0/cudnn_compatible_lstm_cell/kernel
I Loading variable from checkpoint: layer_1/bias
I Loading variable from checkpoint: layer_1/weights
I Loading variable from checkpoint: layer_2/bias
I Loading variable from checkpoint: layer_2/weights
I Loading variable from checkpoint: layer_3/bias
I Loading variable from checkpoint: layer_3/weights
I Loading variable from checkpoint: layer_5/bias
I Loading variable from checkpoint: layer_5/weights
I Loading variable from checkpoint: layer_6/bias
I Loading variable from checkpoint: layer_6/weights
Traceback (most recent call last):
File “./DeepSpeech.py”, line 12, in
ds_train.run_script()
File “/media/mypc/DATA1/DeepSpeech/training/deepspeech_training/train.py”, line 982, in run_script
absl.app.run(main)
File “/home/mypc/.local/lib/python3.6/site-packages/absl/app.py”, line 312, in run
_run_main(main, args)
File “/home/mypc/.local/lib/python3.6/site-packages/absl/app.py”, line 258, in _run_main
sys.exit(main(argv))
File “/media/mypc/DATA1/DeepSpeech/training/deepspeech_training/train.py”, line 962, in main
export()
File “/media/mypc/DATA1/DeepSpeech/training/deepspeech_training/train.py”, line 843, in export
tflite_model = converter.convert()
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/lite/python/lite.py”, line 983, in convert
**converter_kwargs)
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/lite/python/convert.py”, line 449, in toco_convert_impl
enable_mlir_converter=enable_mlir_converter)
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/lite/python/convert.py”, line 200, in toco_convert_protos
raise ConverterError(“See console for info.\n%s\n%s\n” % (stdout, stderr))
tensorflow.lite.python.convert.ConverterError: See console for info.
Traceback (most recent call last):
File “/home/mypc/.local/bin/toco_from_protos”, line 5, in
from tensorflow.lite.toco.python.toco_from_protos import main
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow/init.py”, line 102, in
from tensorflow_core import *
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/init.py”, line 28, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow/init.py”, line 50, in getattr
module = self._load()
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow/init.py”, line 44, in _load
module = _importlib.import_module(self.name)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/init.py”, line 73, in
from tensorflow.python.ops.standard_ops import *
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/standard_ops.py”, line 25, in
from tensorflow.python import autograph
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/autograph/init.py”, line 35, in
from tensorflow.python.autograph import operators
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/autograph/init.py”, line 37, in
from tensorflow.python.autograph.core.converter import ConversionOptions
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/autograph/core/converter.py”, line 69, in
from tensorflow.python.autograph.pyct import anno
File “/home/mypc/.local/lib/python3.6/site-packages/tensorflow_core/python/autograph/pyct/anno.py”, line 27, in
import gast
ModuleNotFoundError: No module named ‘gast’
I have tried to uninstall and reinstall the gast packages but i get same error
How to fix this?