AttributeError: module ‘tensorflow._api.v1.compat.v2‘ has no attribute ‘__internal__‘【亲测有效】

环境:win10+gpu 3090

mask-rcnn-master模型在执行train.py时报错:

AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'

解决方法:

1.卸载:

pip uninstall keras-nightly

2.安装:

pip install -i https://pypi.douban.com/simple/ h5py==2.10.0

pip install -i https://pypi.douban.com/simple/ keras==2.3.1

你可能感兴趣的:(mask_rcnn,gpu,tensorflow,深度学习,机器学习)