rcmalli / keras-vggface

VGGFace implementation with Keras Framework
MIT License
928 stars 417 forks source link

Make tensorflow be optional to allow using tensorflow-gpu #29

Closed tiangolo closed 6 years ago

tiangolo commented 6 years ago

As tensorflow is listed as a dependency of this project, if tensorflow-gpu (the GPU / Nvidia version) is installed, it will be overwritten and not used. It makes this package incompatible with GPUs and only work in CPU.

The change is based on one of the possible workarounds suggested in a related TensorFlow issue: https://github.com/tensorflow/tensorflow/issues/7166

The change is only the section with:

 extras_require={
        "tf": ["tensorflow"],
        "tf_gpu": ["tensorflow-gpu"],
    })

The rest is just auto-formatting (yapf).

rcmalli commented 6 years ago

Thanks, it seems a better way to handle tensorflow dependency.

tiangolo commented 6 years ago

Thanks! :tada: