首页 > 其他分享 >tensorflow2.0+TF-lite 各种报错

tensorflow2.0+TF-lite 各种报错

时间:2023-02-22 17:45:23浏览次数:40  
标签:keras tensorflow2.0 pip 报错 install typing TF tensorflow

generic_type: type "InterpreterWrapper" is already registered!

原因:tensorflow2.5.0rc0版本太高,
降低版本:

pip install tensorflow==2.3 

 

 

ValueErron: "batch_size" needs to be set for models with batch normalization layers.

模型搭建直接引用keras,前面去掉tensorflow

 

 

ImportError: cannot import name 'ParamSpec' from 'typing_extensions'

pip install typing-extensions==4.3.0

 

 

cannot import name 'get_config' from 'tensorflow.python.eager.context'

keras版本太高

pip install keras==2.2.5

或者将keras都改成tensorflow.keras

 

 

 

 

标签:keras,tensorflow2.0,pip,报错,install,typing,TF,tensorflow
From: https://www.cnblogs.com/can-glan/p/17145296.html

相关文章