Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
zsdonghao committed Nov 27, 2017
1 parent 129e735 commit 1d5ecbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tensorlayer/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,10 +1888,10 @@ def __init__(
Layer.__init__(self, name=name)
self.inputs = layer.outputs
self.offset_layer = offset_layer

if tf.__version__ < "1.4":
raise Exception("Deformable CNN layer requires tensrflow 1.4 or higher version")

print(" [TL] DeformableConv2dLayer %s: shape:%s, act:%s" %
(self.name, str(shape), act.__name__))

Expand Down Expand Up @@ -2525,7 +2525,7 @@ def __init__(
if len(strides) == 2:
strides = [1, strides[0], strides[1], 1]

assert len(strides) == 4, "len(strides) should be 4."
assert len(strides) == 4, "len(strides) should be 4."

with tf.variable_scope(name) as vs:
W = tf.get_variable(name='W_sepconv2d', shape=shape, initializer=W_init, **W_init_args ) # [filter_height, filter_width, in_channels, channel_multiplier]
Expand All @@ -2546,8 +2546,8 @@ def __init__(

## Super resolution
def SubpixelConv2d(net, scale=2, n_out_channel=None, act=tf.identity, name='subpixel_conv2d'):
"""The :class:`SubpixelConv2d` class is a sub-pixel 2d convolutional ayer, usually be used
for Super-Resolution applications, `example code <https://github.com/zsdonghao/SRGAN/>`_.
"""It is a sub-pixel 2d upsampling layer, usually be used
for Super-Resolution applications, see `example code <https://github.com/zsdonghao/SRGAN/>`_.
Parameters
------------
Expand Down Expand Up @@ -2636,7 +2636,7 @@ def _PS(X, r, n_out_channel):
return net_new

def SubpixelConv2d_old(net, scale=2, n_out_channel=None, act=tf.identity, name='subpixel_conv2d'):
"""The :class:`SubpixelConv2d` class is a sub-pixel 2d convolutional ayer, usually be used
"""It is a sub-pixel 2d upsampling layer, usually be used
for Super-Resolution applications, `example code <https://github.com/zsdonghao/SRGAN/>`_.
Parameters
Expand Down Expand Up @@ -4924,7 +4924,7 @@ def __init__(
print(" non specified batch_size, uses a tensor instead.")
self.batch_size = batch_size


outputs = []
self.cell = cell = cell_fn(shape=cell_shape, filter_size=filter_size, num_features=feature_map)
if initial_state is None:
Expand Down
4 changes: 2 additions & 2 deletions tensorlayer/prepro.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def zoom(x, zoom_range=(0.9, 1.1), is_random=False, row_index=0, col_index=1, ch
An image with dimension of [row, col, channel] (default).
zoom_range : list or tuple
- If is_random=False, (h, w) are the fixed zoom factor for row and column axies, factor small than one is zoom in.
- If is_random=True, (min zoom out, max zoom out) for x and y with different random zoom in/out factor.
- If is_random=True, it is (min zoom out, max zoom out) for x and y with different random zoom in/out factor.
e.g (0.5, 1) zoom in 1~2 times.
is_random : boolean, default False
If True, randomly zoom.
Expand Down Expand Up @@ -2005,7 +2005,7 @@ def obj_box_zoom(im, classes=[], coords=[], zoom_range=(0.9, 1.1),
An image with dimension of [row, col, channel] (default).
classes : list of class ID (int).
coords : list of list for coordinates [[x, y, w, h], [x, y, w, h], ...]
zoom_range, row_index, col_index, channel_index, is_random, fill_mode, cval, order : see ``tl.prepro.shift``.
zoom_range, row_index, col_index, channel_index, is_random, fill_mode, cval, order : see ``tl.prepro.zoom``.
is_rescale : boolean, default False
Set to True, if the coordinates are rescaled to [0, 1].
is_center : boolean, default False
Expand Down

0 comments on commit 1d5ecbf

Please sign in to comment.