[验证码识别-训练] This project is based on CNN/ResNet/DenseNet+GRU/LSTM+CTC/CrossEntropy to realize verification code identification. This project is only for training the model.
Apache License 2.0
3.02k
stars
821
forks
source link
ValueError: None is only supported in the 1st dimension. Tensor 'input' has invalid shape '[None, None, 60, 1]'. #79
模型已经训练完毕,在保存模型时,报错如下:
Traceback (most recent call last):
File "trains.py", line 336, in
tf.compat.v1.app.run()
File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/anaconda3/lib/python3.7/site-packages/absl_py-0.7.1-py3.7.egg/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/anaconda3/lib/python3.7/site-packages/absl_py-0.7.1-py3.7.egg/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "trains.py", line 329, in main
Trains(model_conf).train_process()
File "trains.py", line 318, in train_process
self.compile_graph(accuracy)
File "trains.py", line 117, in compile_graph
self.compile_tflite(last_compile_model_path)
File "trains.py", line 63, in compile_tflite
tflite_model = converter.convert()
File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/lite/python/lite.py", line 811, in convert
_get_tensor_name(tensor), shape_list))
ValueError: None is only supported in the 1st dimension. Tensor 'input' has invalid shape '[None, None, 60, 1]'.
模型已经训练完毕,在保存模型时,报错如下: Traceback (most recent call last): File "trains.py", line 336, in
tf.compat.v1.app.run()
File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/anaconda3/lib/python3.7/site-packages/absl_py-0.7.1-py3.7.egg/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/anaconda3/lib/python3.7/site-packages/absl_py-0.7.1-py3.7.egg/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "trains.py", line 329, in main
Trains(model_conf).train_process()
File "trains.py", line 318, in train_process
self.compile_graph(accuracy)
File "trains.py", line 117, in compile_graph
self.compile_tflite(last_compile_model_path)
File "trains.py", line 63, in compile_tflite
tflite_model = converter.convert()
File "/usr/local/anaconda3/lib/python3.7/site-packages/tensorflow/lite/python/lite.py", line 811, in convert
_get_tensor_name(tensor), shape_list))
ValueError: None is only supported in the 1st dimension. Tensor 'input' has invalid shape '[None, None, 60, 1]'.