fizyr / keras-maskrcnn

Keras implementation of MaskRCNN object detection.
Apache License 2.0
406 stars 131 forks source link

AttributeError: module 'tensorflow' has no attribute 'config' #117

Open WestbrookZero opened 3 years ago

WestbrookZero commented 3 years ago

My environment is tensorflow-gpu1.13.1 , keras 2.2.4. Using TensorFlow backend. Traceback (most recent call last): File "D:/Projects/Segment/Portrait/keras-maskrcnn/examples/ResNet50MaskRCNN.py", line 38, in setup_gpu(0) File "C:\Users\wuq\AppData\Roaming\Python\Python35\site-packages\keras_retinanet\utils\gpu.py", line 25, in setup_gpu gpus = tf.config.list_physical_devices('GPU') AttributeError: module 'tensorflow' has no attribute 'config'

Kirstihly commented 3 years ago

For tensorflow1, to find out which device is used, you can enable log device placement and check outputs.

sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))