Skip to content

[keras/layers/pooling] Standardise docstring usage of "Default to" #17966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions keras/layers/pooling/average_pooling2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ class AveragePooling2D(Pooling2D):
`(batch, height, width, channels)` while `channels_first`
corresponds to inputs with shape
`(batch, channels, height, width)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.

Input shape:
- If `data_format='channels_last'`:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/average_pooling3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class AveragePooling3D(Pooling3D):
`(batch, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch, channels, spatial_dim1, spatial_dim2, spatial_dim3)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.

Input shape:
- If `data_format='channels_last'`:
Expand Down
6 changes: 3 additions & 3 deletions keras/layers/pooling/global_average_pooling2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class GlobalAveragePooling2D(GlobalPooling2D):
`(batch, height, width, channels)` while `channels_first`
corresponds to inputs with shape
`(batch, channels, height, width)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses `image_data_format` value found
in your Keras config file at `~/.keras/keras.json`
(if exists) else 'channels_last'. Defaults to 'channels_last'.
keepdims: A boolean, whether to keep the spatial dimensions or not.
If `keepdims` is `False` (default), the rank of the tensor is reduced
for spatial dimensions.
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/global_average_pooling3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class GlobalAveragePooling3D(GlobalPooling3D):
`(batch, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch, channels, spatial_dim1, spatial_dim2, spatial_dim3)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.
keepdims: A boolean, whether to keep the spatial dimensions or not.
If `keepdims` is `False` (default), the rank of the tensor is reduced
for spatial dimensions.
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/global_max_pooling2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class GlobalMaxPooling2D(GlobalPooling2D):
`(batch, height, width, channels)` while `channels_first`
corresponds to inputs with shape
`(batch, channels, height, width)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.
keepdims: A boolean, whether to keep the spatial dimensions or not.
If `keepdims` is `False` (default), the rank of the tensor is reduced
for spatial dimensions.
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/global_max_pooling3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ class GlobalMaxPooling3D(GlobalPooling3D):
`(batch, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch, channels, spatial_dim1, spatial_dim2, spatial_dim3)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.
keepdims: A boolean, whether to keep the spatial dimensions or not.
If `keepdims` is `False` (default), the rank of the tensor is reduced
for spatial dimensions.
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/max_pooling2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ class MaxPooling2D(Pooling2D):
`(batch, height, width, channels)` while `channels_first`
corresponds to inputs with shape
`(batch, channels, height, width)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.

Input shape:
- If `data_format='channels_last'`:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/pooling/max_pooling3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class MaxPooling3D(Pooling3D):
`(batch, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch, channels, spatial_dim1, spatial_dim2, spatial_dim3)`.
It defaults to the `image_data_format` value found in your
Keras config file at `~/.keras/keras.json`.
If you never set it, then it will be "channels_last".
When unspecified, uses
`image_data_format` value found in your Keras config file at
`~/.keras/keras.json` (if exists) else 'channels_last'.
Defaults to 'channels_last'.

Input shape:
- If `data_format='channels_last'`:
Expand Down