theAIGuysCode / Object-Detection-API

Yolov3 Object Detection implemented as APIs, using TensorFlow and Flask
Apache License 2.0
339 stars 179 forks source link

ValueError: Memory growth cannot differ between GPU devices #22

Closed Flionay closed 2 years ago

Flionay commented 3 years ago

The code about muti-gpus should be:


    physical_devices = tf.config.experimental.list_physical_devices('GPU')
    if len(physical_devices) > 0:
        tf.config.set_visible_devices(physical_devices[0:1], 'GPU')