Skip to content

Commit

Permalink
Merge pull request #17969 from SamuelMarks:keras.layers.reshaping-def…
Browse files Browse the repository at this point in the history
…aults-to

PiperOrigin-RevId: 526072634
  • Loading branch information
tensorflower-gardener committed Apr 21, 2023
2 parents fedc0a1 + 6937ac7 commit 64d50c4
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
7 changes: 4 additions & 3 deletions keras/layers/reshaping/cropping2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ class Cropping2D(Layer):
`(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'.
Input shape:
4D tensor with shape:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/cropping3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ class Cropping3D(Layer):
`(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch_size, 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:
5D tensor with shape:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ class Flatten(Layer):
`channels_last` corresponds to inputs with shape
`(batch, ..., channels)` while `channels_first` corresponds to
inputs with shape `(batch, channels, ...)`.
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'.
Example:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/up_sampling2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ class UpSampling2D(Layer):
`(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'.
interpolation: A string, one of `"area"`, `"bicubic"`, `"bilinear"`,
`"gaussian"`, `"lanczos3"`, `"lanczos5"`, `"mitchellcubic"`,
`"nearest"`.
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/up_sampling3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ class UpSampling3D(Layer):
`(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch_size, 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:
5D tensor with shape:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/zero_padding2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ class ZeroPadding2D(Layer):
`(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'.
Input shape:
4D tensor with shape:
Expand Down
7 changes: 4 additions & 3 deletions keras/layers/reshaping/zero_padding3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ class ZeroPadding3D(Layer):
`(batch_size, spatial_dim1, spatial_dim2, spatial_dim3, channels)`
while `channels_first` corresponds to inputs with shape
`(batch_size, 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:
5D tensor with shape:
Expand Down

0 comments on commit 64d50c4

Please sign in to comment.