Skip to content

Commit 43aad5e

Browse files
authored
improve docs : no listing for only one condition (#338)
1 parent da487a3 commit 43aad5e

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

tensorlayer/layers/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,7 @@ class OneHotInputLayer(Layer):
471471
depth : None or int
472472
If the input indices is rank N, the output will have rank N+1. The new axis is created at dimension `axis` (default: the new axis is appended at the end).
473473
on_value : None or number
474-
The value to represnt `ON`.
475-
- If None, it will default to the value 1.
474+
The value to represnt `ON`. If None, it will default to the value 1.
476475
off_value : None or number
477476
The value to represnt `OFF`. If None, it will default to the value 0.
478477
axis : None or int

tensorlayer/prepro.py

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,11 @@ def rotation(x, rg=20, is_random=False, row_index=0, col_index=1, channel_index=
148148
row_index col_index and channel_index : int
149149
Index of row, col and channel, default (0, 1, 2), for theano (1, 2, 0).
150150
fill_mode : str
151-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`
152-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
151+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
153152
cval : float
154153
Value used for points outside the boundaries of the input if mode=`constant`. Default is 0.0
155154
order : int
156-
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform``.
157-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
155+
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform`` and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
158156
159157
Returns
160158
-------
@@ -398,13 +396,11 @@ def shift(x, wrg=0.1, hrg=0.1, is_random=False, row_index=0, col_index=1, channe
398396
row_index col_index and channel_index : int
399397
Index of row, col and channel, default (0, 1, 2), for theano (1, 2, 0).
400398
fill_mode : str
401-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`.
402-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
399+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
403400
cval : float
404401
Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0.
405402
order : int
406-
The order of interpolation. The order has to be in the range 0-5. See ``apply_transform``.
407-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
403+
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform`` and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
408404
409405
Returns
410406
-------
@@ -473,13 +469,11 @@ def shear(x, intensity=0.1, is_random=False, row_index=0, col_index=1, channel_i
473469
row_index col_index and channel_index : int
474470
Index of row, col and channel, default (0, 1, 2), for theano (1, 2, 0).
475471
fill_mode : str
476-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`.
477-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
472+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
478473
cval : float
479474
Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0.
480475
order : int
481-
The order of interpolation. The order has to be in the range 0-5. See ``apply_transform``.
482-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
476+
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform`` and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
483477
484478
Returns
485479
-------
@@ -548,13 +542,11 @@ def shear2(x, shear=(0.1, 0.1), is_random=False, row_index=0, col_index=1, chann
548542
row_index col_index and channel_index : int
549543
Index of row, col and channel, default (0, 1, 2), for theano (1, 2, 0).
550544
fill_mode : str
551-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`.
552-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
545+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
553546
cval : float
554547
Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0.
555548
order : int
556-
The order of interpolation. The order has to be in the range 0-5. See ``apply_transform``.
557-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
549+
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform`` and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
558550
559551
Returns
560552
-------
@@ -889,13 +881,11 @@ def zoom(x, zoom_range=(0.9, 1.1), is_random=False, row_index=0, col_index=1, ch
889881
row_index col_index and channel_index : int
890882
Index of row, col and channel, default (0, 1, 2), for theano (1, 2, 0).
891883
fill_mode : str
892-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`.
893-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
884+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
894885
cval : float
895886
Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0.
896887
order : int
897-
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform``.
898-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
888+
The order of interpolation. The order has to be in the range 0-5. See ``tl.prepro.apply_transform`` and `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
899889
900890
Returns
901891
-------
@@ -1631,8 +1621,7 @@ def apply_transform(x, transform_matrix, channel_index=2, fill_mode='nearest', c
16311621
channel_index : int
16321622
Index of channel, default 2.
16331623
fill_mode : str
1634-
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`
1635-
- `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
1624+
Method to fill missing pixel, default `nearest`, more options `constant`, `reflect` or `wrap`, see `scipy ndimage affine_transform <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html>`__
16361625
cval : float
16371626
Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0
16381627
order : int

0 commit comments

Comments
 (0)