matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.57k stars 11.69k forks source link

Attribute Error #2568

Open israr0541 opened 3 years ago

israr0541 commented 3 years ago

AttributeError Traceback (most recent call last)

in () 1 # Create model object in inference mode. ----> 2 model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) 3 # Load weights trained on MS-COCO 4 model.load_weights(COCO_MODEL_PATH, by_name=True) 7 frames /usr/local/lib/python3.7/dist-packages/tensorflow/python/autograph/impl/api.py in wrapper(*args, **kwargs) 668 except Exception as e: # pylint:disable=broad-except 669 if hasattr(e, 'ag_error_metadata'): --> 670 raise e.ag_error_metadata.to_exception(e) 671 else: 672 raise AttributeError: in user code: /content/Mask_RCNN/mrcnn/model.py:390 call * roi_level = log2_graph(tf.sqrt(h * w) / (224.0 / tf.sqrt(image_area))) /content/Mask_RCNN/mrcnn/model.py:341 log2_graph * return tf.log(x) / tf.log(2.0) AttributeError: module 'tensorflow' has no attribute 'log'
israr0541 commented 3 years ago

Dear All I am using Google Colab

AndySung320 commented 3 years ago

Try using tf=1.15.2 Keras=2.2.4 Python =3.6