ValueError: Cannot find the variable that is an input to the ReadVariableOp.

在.h5转 .pb文件时,graph_util.convert_variables_to_constants出现下图错误
在这里插入图片描述
当时keras的版本是2.3,降低keras版本pip install keras==2.2
然后提示如下

ImportError: cannot import name 'tokenizer_from_json' from 'keras_preprocessing.text' (/home/tdx/env/tensorflow-gpu/lib/python3.7/site-packages/keras_preprocessing/text.py)

原因是pip install keras==2.2默认安装的是2.2.0

应该pip install keras==2.2.4
然后结果就没问题了
参考https://blog.csdn.net/u014742995/article/details/102911861

你可能感兴趣的:(tensorflow)