@@ -1888,10 +1888,10 @@ def __init__(
18881888 Layer .__init__ (self , name = name )
18891889 self .inputs = layer .outputs
18901890 self .offset_layer = offset_layer
1891-
1891+
18921892 if tf .__version__ < "1.4" :
18931893 raise Exception ("Deformable CNN layer requires tensrflow 1.4 or higher version" )
1894-
1894+
18951895 print (" [TL] DeformableConv2dLayer %s: shape:%s, act:%s" %
18961896 (self .name , str (shape ), act .__name__ ))
18971897
@@ -2525,7 +2525,7 @@ def __init__(
25252525 if len (strides ) == 2 :
25262526 strides = [1 , strides [0 ], strides [1 ], 1 ]
25272527
2528- assert len (strides ) == 4 , "len(strides) should be 4."
2528+ assert len (strides ) == 4 , "len(strides) should be 4."
25292529
25302530 with tf .variable_scope (name ) as vs :
25312531 W = tf .get_variable (name = 'W_sepconv2d' , shape = shape , initializer = W_init , ** W_init_args ) # [filter_height, filter_width, in_channels, channel_multiplier]
@@ -2546,8 +2546,8 @@ def __init__(
25462546
25472547## Super resolution
25482548def SubpixelConv2d (net , scale = 2 , n_out_channel = None , act = tf .identity , name = 'subpixel_conv2d' ):
2549- """The :class:`SubpixelConv2d` class is a sub-pixel 2d convolutional ayer , usually be used
2550- for Super-Resolution applications, `example code <https://github.com/zsdonghao/SRGAN/>`_.
2549+ """It is a sub-pixel 2d upsampling layer , usually be used
2550+ for Super-Resolution applications, see `example code <https://github.com/zsdonghao/SRGAN/>`_.
25512551
25522552 Parameters
25532553 ------------
@@ -2636,7 +2636,7 @@ def _PS(X, r, n_out_channel):
26362636 return net_new
26372637
26382638def SubpixelConv2d_old (net , scale = 2 , n_out_channel = None , act = tf .identity , name = 'subpixel_conv2d' ):
2639- """The :class:`SubpixelConv2d` class is a sub-pixel 2d convolutional ayer , usually be used
2639+ """It is a sub-pixel 2d upsampling layer , usually be used
26402640 for Super-Resolution applications, `example code <https://github.com/zsdonghao/SRGAN/>`_.
26412641
26422642 Parameters
@@ -4924,7 +4924,7 @@ def __init__(
49244924 print (" non specified batch_size, uses a tensor instead." )
49254925 self .batch_size = batch_size
49264926
4927-
4927+
49284928 outputs = []
49294929 self .cell = cell = cell_fn (shape = cell_shape , filter_size = filter_size , num_features = feature_map )
49304930 if initial_state is None :
0 commit comments