From c7bcf63e3dab8fb257eaff216bc2817ed1aa461f Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Wed, 12 Apr 2023 20:36:30 -0400 Subject: [PATCH] [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" --- keras/layers/convolutional/base_depthwise_conv.py | 8 ++++---- keras/layers/convolutional/conv1d_transpose.py | 2 +- keras/layers/convolutional/conv2d.py | 10 +++++----- keras/layers/convolutional/conv2d_transpose.py | 6 +++--- keras/layers/convolutional/conv3d.py | 10 +++++----- keras/layers/convolutional/conv3d_transpose.py | 6 +++--- keras/layers/convolutional/depthwise_conv1d.py | 6 +++--- keras/layers/convolutional/depthwise_conv2d.py | 6 +++--- keras/layers/convolutional/separable_conv2d.py | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/keras/layers/convolutional/base_depthwise_conv.py b/keras/layers/convolutional/base_depthwise_conv.py index 425586dc04b..f18c25ee89f 100644 --- a/keras/layers/convolutional/base_depthwise_conv.py +++ b/keras/layers/convolutional/base_depthwise_conv.py @@ -65,10 +65,10 @@ class DepthwiseConv(Conv): `channels_first`. The ordering of the dimensions in the inputs. `channels_last` corresponds to inputs with shape `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with - shape `(batch_size, 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'. + shape `(batch_size, channels, height, width)`. If left 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'. dilation_rate: An integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Currently, specifying any `dilation_rate` value != 1 is incompatible with specifying any `strides` diff --git a/keras/layers/convolutional/conv1d_transpose.py b/keras/layers/convolutional/conv1d_transpose.py index 026ae1d6bc6..e74cff0332c 100644 --- a/keras/layers/convolutional/conv1d_transpose.py +++ b/keras/layers/convolutional/conv1d_transpose.py @@ -54,7 +54,7 @@ class Conv1DTranspose(Conv1D): kernel_size: An integer length of the 1D convolution window. strides: An integer specifying the stride of the convolution along the time dimension. Specifying a stride value != 1 is incompatible with - specifying a `dilation_rate` value != 1. Defaults to 1. + specifying a `dilation_rate` value != 1. Defaults to `1`. padding: one of `"valid"` or `"same"` (case-insensitive). `"valid"` means no padding. `"same"` results in padding with zeros evenly to the left/right or up/down of the input such that output has diff --git a/keras/layers/convolutional/conv2d.py b/keras/layers/convolutional/conv2d.py index 2c44cad555d..6a6c3aae0f4 100644 --- a/keras/layers/convolutional/conv2d.py +++ b/keras/layers/convolutional/conv2d.py @@ -101,11 +101,11 @@ class Conv2D(Conv): `channels_first`. The ordering of the dimensions in the inputs. `channels_last` corresponds to inputs with shape `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with - shape `(batch_size, 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`. Note that the `channels_first` format is currently not - supported by TensorFlow on CPU. + shape `(batch_size, channels, height, width)`. If left unspecified, it + uses the `image_data_format` value found in your Keras config file at + `~/.keras/keras.json` (if exists) else 'channels_last'. + Note that the `channels_first` format is currently not + supported by TensorFlow on CPU. Defaults to 'channels_last'. dilation_rate: an integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for all spatial dimensions. Currently, specifying diff --git a/keras/layers/convolutional/conv2d_transpose.py b/keras/layers/convolutional/conv2d_transpose.py index 5003cabbc08..772b761e95d 100644 --- a/keras/layers/convolutional/conv2d_transpose.py +++ b/keras/layers/convolutional/conv2d_transpose.py @@ -82,9 +82,9 @@ class Conv2DTranspose(Conv2D): `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with shape `(batch_size, 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". dilation_rate: an integer, specifying the dilation rate for all spatial dimensions for dilated convolution. Specifying different dilation rates for different dimensions is not supported. diff --git a/keras/layers/convolutional/conv3d.py b/keras/layers/convolutional/conv3d.py index bff96123d1f..bfcfcf5012e 100644 --- a/keras/layers/convolutional/conv3d.py +++ b/keras/layers/convolutional/conv3d.py @@ -83,11 +83,11 @@ class Conv3D(Conv): `channels_last` corresponds to inputs with shape `batch_shape + (spatial_dim1, spatial_dim2, spatial_dim3, channels)` while `channels_first` corresponds to inputs with shape `batch_shape + - (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". Note that the `channels_first` format is currently not - supported by TensorFlow on CPU. + (channels, spatial_dim1, spatial_dim2, spatial_dim3)`. When unspecified, + uses `image_data_format` value found in your Keras config file at + `~/.keras/keras.json` (if exists) else 'channels_last'. Note that the + `channels_first` format is currently not supported by TensorFlow on CPU. + Defaults to 'channels_last'. dilation_rate: an integer or tuple/list of 3 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for all spatial dimensions. Currently, specifying diff --git a/keras/layers/convolutional/conv3d_transpose.py b/keras/layers/convolutional/conv3d_transpose.py index d5778d2ea43..dcb9b54a666 100644 --- a/keras/layers/convolutional/conv3d_transpose.py +++ b/keras/layers/convolutional/conv3d_transpose.py @@ -82,9 +82,9 @@ class Conv3DTranspose(Conv3D): `(batch_size, depth, height, width, channels)` while `channels_first` corresponds to inputs with shape `(batch_size, channels, depth, 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'. dilation_rate: an integer or tuple/list of 3 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for diff --git a/keras/layers/convolutional/depthwise_conv1d.py b/keras/layers/convolutional/depthwise_conv1d.py index 49de8d3a426..b1cca7a3735 100644 --- a/keras/layers/convolutional/depthwise_conv1d.py +++ b/keras/layers/convolutional/depthwise_conv1d.py @@ -67,10 +67,10 @@ class DepthwiseConv1D(DepthwiseConv): `channels_first`. The ordering of the dimensions in the inputs. `channels_last` corresponds to inputs with shape `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with - shape `(batch_size, channels, height, width)`. It defaults to the + shape `(batch_size, channels, height, width)`. When unspecified, uses `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'. + `~/.keras/keras.json` (if exists) else 'channels_last'. + Defaults to 'channels_last'. dilation_rate: A single integer, specifying the dilation rate to use for dilated convolution. Currently, specifying any `dilation_rate` value != 1 is incompatible with specifying any stride value != 1. diff --git a/keras/layers/convolutional/depthwise_conv2d.py b/keras/layers/convolutional/depthwise_conv2d.py index 4ff8de316ab..24edea72966 100644 --- a/keras/layers/convolutional/depthwise_conv2d.py +++ b/keras/layers/convolutional/depthwise_conv2d.py @@ -68,10 +68,10 @@ class DepthwiseConv2D(DepthwiseConv): `channels_first`. The ordering of the dimensions in the inputs. `channels_last` corresponds to inputs with shape `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with - shape `(batch_size, channels, height, width)`. It defaults to the + shape `(batch_size, channels, height, width)`. When unspecified, uses `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'. + `~/.keras/keras.json` (if exists) else 'channels_last'. + Defaults to 'channels_last'. dilation_rate: An integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Currently, specifying any `dilation_rate` value != 1 is incompatible with specifying any `strides` diff --git a/keras/layers/convolutional/separable_conv2d.py b/keras/layers/convolutional/separable_conv2d.py index f0d626331a5..8290758b48c 100644 --- a/keras/layers/convolutional/separable_conv2d.py +++ b/keras/layers/convolutional/separable_conv2d.py @@ -70,9 +70,9 @@ class SeparableConv2D(SeparableConv): `(batch_size, height, width, channels)` while `channels_first` corresponds to inputs with shape `(batch_size, 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'. dilation_rate: An integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. depth_multiplier: The number of depthwise convolution output channels