Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'keras.engine' has no attribute 'Layer' error #157

Open
Ishan-10038 opened this issue Jul 13, 2021 · 1 comment
Open

module 'keras.engine' has no attribute 'Layer' error #157

Ishan-10038 opened this issue Jul 13, 2021 · 1 comment

Comments

@Ishan-10038
Copy link

Dear Author,
When I run this part of the code
"# Import all the packages of Matterport Mask R-CNN
import os
import sys
import itertools
import math
import logging
import json
import re
import random
from collections import OrderedDict
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.lines as lines
from matplotlib.patches import Polygon
from tensorflow import keras
from mrcnn import utils
from mrcnn import visualize
from mrcnn.visualize import display_images
from mrcnn import model
import mrcnn.model as modellib
from mrcnn.model import log
import cv2
import custom,custom_1
import imgaug,h5py,IPython

%matplotlib inline"

I get this error
AttributeError Traceback (most recent call last)
in ()
22 from mrcnn import visualize
23 from mrcnn.visualize import display_images
---> 24 from mrcnn import model
25 import mrcnn.model as modellib
26 from mrcnn.model import log

/content/Mask_RCNN/mrcnn/model.py in ()
253
254
--> 255 class ProposalLayer(KE.Layer):
256 """Receives anchor scores and selects a subset to pass as proposals
257 to the second stage. Filtering is done based on anchor scores and

AttributeError: module 'keras.engine' has no attribute 'Layer'
Please reply

@afghani-iitkgp
Copy link

git clone --quiet https://github.com/matterport/Mask_RCNN.git
pip install -r requirements.txt
python setup.py install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants