ImportError: cannot import name 'tokenizer_from_json' from 'tensorflow.python.keras.preprocessing.text'

 

ImportError: cannot import name 'tokenizer_from_json' from 'tensorflow.python.keras.preprocessing.text' 
(/home/software/anaconda3/envs/mydlenv/lib/python3.8/site-packages/tensorflow/python/keras/preprocessing/text.py)

 

更改keras版本就行,将2.2.0改为2.2.4  [可行方案]

pip install keras==2.2.4

 

posted @ 2023-10-09 22:30  emanlee  阅读(163)  评论(0编辑  收藏  举报