Explorar o código

migrate to tenforflowf 2.0

SUN Hao %!s(int64=3) %!d(string=hai) anos
pai
achega
f452a354b5
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  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 *