From 6eb7dda7ef659b17668ac42f64e41422aa24f5d2 Mon Sep 17 00:00:00 2001 From: kur Date: Sun, 17 Nov 2019 01:42:27 +0900 Subject: [PATCH] Supprot tf2 --- src/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index 91baa4b..9557efd 100644 --- a/src/core.py +++ b/src/core.py @@ -90,7 +90,7 @@ def assert_img_range(img): def decategorize(mask): return iu.decategorize(mask, iu.rgb2wk_map) - with tf.Session() as sess: + with tf.compat.v1.Session() as sess: snet_in = consts.snet_in('0.1.0', sess) snet_out = consts.snet_out('0.1.0', sess) def snet(img): @@ -169,7 +169,7 @@ def inpainted(image, segmap): ''' assert (255 >= image).all(), image.max() assert (image >= 0).all(), image.min() - with tf.Session() as sess: + with tf.compat.v1.Session() as sess: cnet_in = consts.cnet_in('0.1.0',sess) cnet_out = consts.cnet_out('0.1.0',sess) return inpaint(