class ProposalLayer(KE.Layer): AttributeError: module ‘keras.engine‘ has no attribute ‘Layer‘

训练mask rcnn的时候出现:AttributeError: module ‘keras.engine’ has no attribute 'Layer’

可能是版本问题!!!
卸载:

pip uninstall keras -y
pip uninstall keras-nightly -y
pip uninstall keras-Preprocessing -y
pip uninstall keras-vis -y
pip uninstall tensorflow -y
pip uninstall h5py -y

安装:

pip install tensorflow==1.13.1
pip install keras==2.0.8
pip install h5py==2.10.0

即可解决!!!

你可能感兴趣的:(keras,深度学习)