From 98a3c34d731a1e9b3867b08b1b9289346d2d5650 Mon Sep 17 00:00:00 2001 From: David Laban Date: Sun, 22 Dec 2019 16:29:17 +0000 Subject: [PATCH] use tensorflow.compat.v1 if we are using v2 --- faced/detector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/faced/detector.py b/faced/detector.py index 330fbaf..fec85db 100644 --- a/faced/detector.py +++ b/faced/detector.py @@ -1,4 +1,7 @@ -import tensorflow as tf +try: + import tensorflow.compat.v1 as tf +except ImportError: + import tensorflow as tf import cv2 import numpy as np import os