Skip to content

Commit c7bcf63

Browse files
committed
[keras/layers/convolutional/base_depthwise_conv.py,keras/layers/convolutional/conv1d_transpose.py,keras/layers/convolutional/conv2d.py,keras/layers/convolutional/conv2d_transpose.py,keras/layers/convolutional/conv3d.py,keras/layers/convolutional/conv3d_transpose.py,keras/layers/convolutional/depthwise_conv1d.py,keras/layers/convolutional/depthwise_conv2d.py,keras/layers/convolutional/separable_conv2d.py] Standardise docstring usage of "Default to"
1 parent 0f8e81f commit c7bcf63

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

keras/layers/convolutional/base_depthwise_conv.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class DepthwiseConv(Conv):
6565
`channels_first`. The ordering of the dimensions in the inputs.
6666
`channels_last` corresponds to inputs with shape `(batch_size, height,
6767
width, channels)` while `channels_first` corresponds to inputs with
68-
shape `(batch_size, channels, height, width)`. It defaults to the
69-
`image_data_format` value found in your Keras config file at
70-
`~/.keras/keras.json`. If you never set it, then it will be
71-
'channels_last'.
68+
shape `(batch_size, channels, height, width)`. If left unspecified,
69+
uses `image_data_format` value found in your Keras config file at
70+
`~/.keras/keras.json` (if exists) else 'channels_last'.
71+
Defaults to 'channels_last'.
7272
dilation_rate: An integer or tuple/list of 2 integers, specifying the
7373
dilation rate to use for dilated convolution. Currently, specifying any
7474
`dilation_rate` value != 1 is incompatible with specifying any `strides`

keras/layers/convolutional/conv1d_transpose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Conv1DTranspose(Conv1D):
5454
kernel_size: An integer length of the 1D convolution window.
5555
strides: An integer specifying the stride of the convolution along the
5656
time dimension. Specifying a stride value != 1 is incompatible with
57-
specifying a `dilation_rate` value != 1. Defaults to 1.
57+
specifying a `dilation_rate` value != 1. Defaults to `1`.
5858
padding: one of `"valid"` or `"same"` (case-insensitive).
5959
`"valid"` means no padding. `"same"` results in padding with zeros
6060
evenly to the left/right or up/down of the input such that output has

keras/layers/convolutional/conv2d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ class Conv2D(Conv):
101101
`channels_first`. The ordering of the dimensions in the inputs.
102102
`channels_last` corresponds to inputs with shape `(batch_size, height,
103103
width, channels)` while `channels_first` corresponds to inputs with
104-
shape `(batch_size, channels, height, width)`. It defaults to the
105-
`image_data_format` value found in your Keras config file at
106-
`~/.keras/keras.json`. If you never set it, then it will be
107-
`channels_last`. Note that the `channels_first` format is currently not
108-
supported by TensorFlow on CPU.
104+
shape `(batch_size, channels, height, width)`. If left unspecified, it
105+
uses the `image_data_format` value found in your Keras config file at
106+
`~/.keras/keras.json` (if exists) else 'channels_last'.
107+
Note that the `channels_first` format is currently not
108+
supported by TensorFlow on CPU. Defaults to 'channels_last'.
109109
dilation_rate: an integer or tuple/list of 2 integers, specifying the
110110
dilation rate to use for dilated convolution. Can be a single integer to
111111
specify the same value for all spatial dimensions. Currently, specifying

keras/layers/convolutional/conv2d_transpose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ class Conv2DTranspose(Conv2D):
8282
`(batch_size, height, width, channels)` while `channels_first`
8383
corresponds to inputs with shape
8484
`(batch_size, channels, height, width)`.
85-
It defaults to the `image_data_format` value found in your
86-
Keras config file at `~/.keras/keras.json`.
87-
If you never set it, then it will be "channels_last".
85+
When unspecified, uses `image_data_format` value found in your Keras
86+
config file at `~/.keras/keras.json` (if exists) else 'channels_last'.
87+
Defaults to "channels_last".
8888
dilation_rate: an integer, specifying the dilation rate for all spatial
8989
dimensions for dilated convolution. Specifying different dilation rates
9090
for different dimensions is not supported.

keras/layers/convolutional/conv3d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ class Conv3D(Conv):
8383
`channels_last` corresponds to inputs with shape `batch_shape +
8484
(spatial_dim1, spatial_dim2, spatial_dim3, channels)` while
8585
`channels_first` corresponds to inputs with shape `batch_shape +
86-
(channels, spatial_dim1, spatial_dim2, spatial_dim3)`. It defaults to
87-
the `image_data_format` value found in your Keras config file at
88-
`~/.keras/keras.json`. If you never set it, then it will be
89-
"channels_last". Note that the `channels_first` format is currently not
90-
supported by TensorFlow on CPU.
86+
(channels, spatial_dim1, spatial_dim2, spatial_dim3)`. When unspecified,
87+
uses `image_data_format` value found in your Keras config file at
88+
`~/.keras/keras.json` (if exists) else 'channels_last'. Note that the
89+
`channels_first` format is currently not supported by TensorFlow on CPU.
90+
Defaults to 'channels_last'.
9191
dilation_rate: an integer or tuple/list of 3 integers, specifying the
9292
dilation rate to use for dilated convolution. Can be a single integer to
9393
specify the same value for all spatial dimensions. Currently, specifying

keras/layers/convolutional/conv3d_transpose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ class Conv3DTranspose(Conv3D):
8282
`(batch_size, depth, height, width, channels)` while `channels_first`
8383
corresponds to inputs with shape
8484
`(batch_size, channels, depth, height, width)`.
85-
It defaults to the `image_data_format` value found in your
86-
Keras config file at `~/.keras/keras.json`.
87-
If you never set it, then it will be "channels_last".
85+
When unspecified, uses `image_data_format` value found in your Keras
86+
config file at `~/.keras/keras.json` (if exists) else 'channels_last'.
87+
Defaults to 'channels_last'.
8888
dilation_rate: an integer or tuple/list of 3 integers, specifying
8989
the dilation rate to use for dilated convolution.
9090
Can be a single integer to specify the same value for

keras/layers/convolutional/depthwise_conv1d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class DepthwiseConv1D(DepthwiseConv):
6767
`channels_first`. The ordering of the dimensions in the inputs.
6868
`channels_last` corresponds to inputs with shape `(batch_size, height,
6969
width, channels)` while `channels_first` corresponds to inputs with
70-
shape `(batch_size, channels, height, width)`. It defaults to the
70+
shape `(batch_size, channels, height, width)`. When unspecified, uses
7171
`image_data_format` value found in your Keras config file at
72-
`~/.keras/keras.json`. If you never set it, then it will be
73-
'channels_last'.
72+
`~/.keras/keras.json` (if exists) else 'channels_last'.
73+
Defaults to 'channels_last'.
7474
dilation_rate: A single integer, specifying the dilation rate to use for
7575
dilated convolution. Currently, specifying any `dilation_rate`
7676
value != 1 is incompatible with specifying any stride value != 1.

keras/layers/convolutional/depthwise_conv2d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ class DepthwiseConv2D(DepthwiseConv):
6868
`channels_first`. The ordering of the dimensions in the inputs.
6969
`channels_last` corresponds to inputs with shape `(batch_size, height,
7070
width, channels)` while `channels_first` corresponds to inputs with
71-
shape `(batch_size, channels, height, width)`. It defaults to the
71+
shape `(batch_size, channels, height, width)`. When unspecified, uses
7272
`image_data_format` value found in your Keras config file at
73-
`~/.keras/keras.json`. If you never set it, then it will be
74-
'channels_last'.
73+
`~/.keras/keras.json` (if exists) else 'channels_last'.
74+
Defaults to 'channels_last'.
7575
dilation_rate: An integer or tuple/list of 2 integers, specifying the
7676
dilation rate to use for dilated convolution. Currently, specifying any
7777
`dilation_rate` value != 1 is incompatible with specifying any `strides`

keras/layers/convolutional/separable_conv2d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class SeparableConv2D(SeparableConv):
7070
`(batch_size, height, width, channels)` while `channels_first`
7171
corresponds to inputs with shape
7272
`(batch_size, channels, height, width)`.
73-
It defaults to the `image_data_format` value found in your
74-
Keras config file at `~/.keras/keras.json`.
75-
If you never set it, then it will be "channels_last".
73+
When unspecified, uses `image_data_format` value found in your Keras
74+
config file at `~/.keras/keras.json` (if exists) else 'channels_last'.
75+
Defaults to 'channels_last'.
7676
dilation_rate: An integer or tuple/list of 2 integers, specifying
7777
the dilation rate to use for dilated convolution.
7878
depth_multiplier: The number of depthwise convolution output channels

0 commit comments

Comments
 (0)