module 'keras.engine' has no attribute 'Layer'
AttributeError: module 'keras.engine' has no attribute 'Layer'
this error happened when i run the demo.ipynb
i use the version of

I'm having the same problem aswell. I have downloaded the notebook inside my cloned repo but when I try running it's import section I get the same error. Hope this gets fixed soon.
same problem, any help please
pip install tensorflow==1.14.0
pip install keras==2.0.8
work for me!
it also work for me
i solve this problem. The reason for the error is that I did not install pycocotools. so stupid am i

https://github.com/akTwelve/Mask_RCNN use this repo to resolve the issue , without chaning any versions of keras and tensorflow .. And make sure to install pycocotools also . Thank You .
i still not able to solve this problem even after installing pycocotools . please give me some solid solution
Update your repo to the recent release , i provided link in my comment
On Sat, 26 Mar 2022, 12:04 Aditya_180859, @.***> wrote:
i still not able to solve this problem even after installing pycocotools . please give me some solid solution
— Reply to this email directly, view it on GitHub https://github.com/matterport/Mask_RCNN/issues/2783#issuecomment-1079620759, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHMFIPMWRY7XLU6TERZPX3VB2VV3ANCNFSM5PUXXATA . You are receiving this because you commented.Message ID: @.***>
i updated everything still can't able to solve
Which version of tensorflow you are using?
On Sat, 26 Mar 2022, 12:15 Aditya_180859, @.***> wrote:
i updated everything still can't able to solve
— Reply to this email directly, view it on GitHub https://github.com/matterport/Mask_RCNN/issues/2783#issuecomment-1079622605, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHMFIOK3NHF7EPUILLXGTDVB2XATANCNFSM5PUXXATA . You are receiving this because you commented.Message ID: @.***>
2.8 .now what i have to do
same problem
pip install tensorflow==1.14.0pip install keras==2.0.8work for me!
ERROR: Could not find a version that satisfies the requirement tensorflow==1.14.30 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2) ERROR: No matching distribution found for tensorflow==1.14.30
tf=2.8, same error. I think it's not caused by wrong version of keras. Do u find sloution?
Same problem here. Tried the 'solutions' here, but they didn't work... Please help.
Same problem here. Can't seem to find any working solution
Tried all the possible solutions mentioned here but nothing worked
ERROR: Could not find a version that satisfies the requirement tensorflow==1.14.30 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2) ERROR: No matching distribution found for tensorflow==1.14.30
@Hey2296 Install via conda instead of pip might help. Try this:
conda install tensorflow==1.14.0
That worked for me. And since keras can be installed by pip, pip install keras==2.0.8 should work fine.
I tried to change KE.Layer to be KE.base_layer.Layer and its work
https://github.com/akTwelve/Mask_RCNN use this repo to resolve the issue , without chaning any versions of keras and tensorflow .. And make sure to install pycocotools also . Thank You .
Hey, it worked for me, I was trying to use an old project of my friend and Mask R-CNN files were not running with TensorFlow>=2.0, I installed the version of this repo and run "python setup.py install".
I'm using Windows 10, with Conda and Jupyter, and I ran this command inside the env I'm working with Mask R-CNN requirements.
If you gonna make any changes inside of Mask R-CNN model files, you need to run "python setup.py install" again, for changes take effect.
ty
Update your repo to the recent release , i provided link in my comment … On Sat, 26 Mar 2022, 12:04 Aditya_180859, @.> wrote: i still not able to solve this problem even after installing pycocotools . please give me some solid solution — Reply to this email directly, view it on GitHub <#2783 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHMFIPMWRY7XLU6TERZPX3VB2VV3ANCNFSM5PUXXATA . You are receiving this because you commented.Message ID: @.>
Hi, thank you for sharing the new version Mask R-CNN code repo. I tried to run the demo code. But it gave me the Error in PredictCost() for the op: op: "CropAndResize". I searched it online, it seemed to be with the package version. I want to know if you had the same issue or not.
i tried to change "KE.Layer" to "KL.Layer", and it work
i tried to change "KE.Layer" to "KL.Layer", and it work
Thank you! I will try it.
it was also suggested that: change KE.Layer to be KE.base_layer.Layer https://blog.csdn.net/qq_41413211/article/details/127562472?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22127562472%22%2C%22source%22%3A%22unlogin%22%7D
however, i gived up this code several weeks ago, so i didnt try the upon suggestion
it was also suggested that: change KE.Layer to be KE.base_layer.Layer https://blog.csdn.net/qq_41413211/article/details/127562472?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22127562472%22%2C%22source%22%3A%22unlogin%22%7D
however, i gived up this code several weeks ago, so i didnt try the upon suggestion
Tried to change KE.Layer to KE.base_layer.Layer and it works.
There's total 3 line to change in model.py
- class ProposalLayer(KE.base_layer.Layer):
- class PyramidROIAlign(KE.base_layer.Layer):
- class DetectionLayer(KE.base_layer.Layer):
it was also suggested that: change KE.Layer to be KE.base_layer.Layer https://blog.csdn.net/qq_41413211/article/details/127562472?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22127562472%22%2C%22source%22%3A%22unlogin%22%7D however, i gived up this code several weeks ago, so i didnt try the upon suggestion
Tried to change
KE.LayertoKE.base_layer.Layerand it works. There's total 3 line to change in model.py
- class ProposalLayer(KE.base_layer.Layer):- class PyramidROIAlign(KE.base_layer.Layer):- class DetectionLayer(KE.base_layer.Layer):
Good solution! Just to add modification of the DetectionTargetLayer class as well.
i tried to change "KE.Layer" to "KL.Layer", and it work
This one work for me after install pip install pycocotools
I tried to change KE.Layer to be KE.base_layer.Layer and its work Thank you and it works
我尝试将 KE.Layer 更改为 KE.base_layer.Layer 及其工作 谢谢,它有效
换了之后不会出现新的错误吗