Skip to content

Commit

Permalink
Add example on how to replace Conv2DTranspose with UpSampling2D
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Oct 29, 2019
1 parent 5072996 commit 34e8e6e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,20 @@ Why are `Conv2DTranspose` layers not supported?
`UpSampling2D` layers seem to be the better alternative:
https://distill.pub/2016/deconv-checkerboard/

Basically, instead of this:

```python
x = Conv2DTranspose(8, (3, 3), strides=(2, 2), padding='same')(x)
```

one uses that:

```python
x = Conv2D(8, (3, 3), padding='same')(UpSampling2D(2)(x))
```

In case you are not in the position to change your model's
architecture to use `UpSampling2D` instead of `Conv2DTranspose`,
architecture to make that change,
feel free to implement `Conv2DTranspose` in frugally-deep and
submit a [pull request](https://github.com/Dobiasd/frugally-deep/pulls). :)

Expand Down

0 comments on commit 34e8e6e

Please sign in to comment.