环境 windows10 、tensorflow2.6版本(已由2.9降至2.6)
报错 ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental'
![](https://img.haomeiwen.com/i7468301/ff2158fdaf39d25f.png)
原因:keras与tensorflow版本不匹配
将keras 2.9.0 降至2.6.0
pip install keras==2.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
将keras 2.9.0 降至2.6.0
pip install keras==2.6.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
本文标题:keras报错ImportError: cannot impor
本文链接:https://www.haomeiwen.com/subject/tvxbnrtx.html
网友评论