Przeglądaj źródła

migrate to tenforflowf 2.0

SUN Hao 3 lat temu
rodzic
commit
f452a354b5
2 zmienionych plików z 5 dodań i 2 usunięć
  1. 2 1
      main.py
  2. 3 1
      model.py

+ 2 - 1
main.py

@@ -4,7 +4,8 @@ import argparse
 from glob import glob
 
 from PIL import Image
-import tensorflow as tf
+import tensorflow.compat.v1 as tf
+tf.disable_v2_behavior()
 
 from model import lowlight_enhance
 from utils import *

+ 3 - 1
model.py

@@ -5,7 +5,9 @@ import time
 import random
 
 from PIL import Image
-import tensorflow as tf
+import tensorflow.compat.v1 as tf
+tf.disable_v2_behavior()
+
 import numpy as np
 
 from utils import *