@@ -85,7 +85,8 @@ def __init__(self,img_size=32,num_layers=32,feature_size=256,scale=2,output_chan
8585 x = utils .upsample (x ,scale ,feature_size ,None )
8686
8787 #One final convolution on the upsampling output
88- self .out = output = x # slim.conv2d(x,output_channels,[3,3])
88+ output = x # slim.conv2d(x,output_channels,[3,3])
89+ self .out = tf .clip_by_value (output + mean_x ,0.0 ,255.0 )
8990
9091 self .loss = loss = tf .reduce_mean (tf .losses .absolute_difference (image_target ,output ))
9192
@@ -99,9 +100,9 @@ def __init__(self,img_size=32,num_layers=32,feature_size=256,scale=2,output_chan
99100 tf .summary .scalar ("loss" ,self .loss )
100101 tf .summary .scalar ("PSNR" ,PSNR )
101102 #Image summaries for input, target, and output
102- tf .summary .image ("input_image" ,self .input + mean_x )
103- tf .summary .image ("target_image" ,self .target + mean_y )
104- tf .summary .image ("output_image" ,self .out + mean_x )
103+ tf .summary .image ("input_image" ,tf . cast ( self .input , tf . uint8 ) )
104+ tf .summary .image ("target_image" ,tf . cast ( self .target , tf . uint8 ) )
105+ tf .summary .image ("output_image" ,tf . cast ( self .out , tf . uint8 ) )
105106
106107 #Tensorflow graph setup... session, saver, etc.
107108 self .sess = tf .Session ()
0 commit comments