Skip to content

Commit 321c676

Browse files
authored
Merge pull request #74 from KUR-creative/tf2
Resolve #73 Supprot tf2
2 parents cb43da7 + 6eb7dda commit 321c676

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def assert_img_range(img):
9090
def decategorize(mask):
9191
return iu.decategorize(mask, iu.rgb2wk_map)
9292

93-
with tf.Session() as sess:
93+
with tf.compat.v1.Session() as sess:
9494
snet_in = consts.snet_in('0.1.0', sess)
9595
snet_out = consts.snet_out('0.1.0', sess)
9696
def snet(img):
@@ -169,7 +169,7 @@ def inpainted(image, segmap):
169169
'''
170170
assert (255 >= image).all(), image.max()
171171
assert (image >= 0).all(), image.min()
172-
with tf.Session() as sess:
172+
with tf.compat.v1.Session() as sess:
173173
cnet_in = consts.cnet_in('0.1.0',sess)
174174
cnet_out = consts.cnet_out('0.1.0',sess)
175175
return inpaint(

0 commit comments

Comments
 (0)