Clear Filters
Clear Filters

When using transposedConv2dLayer, how do you calculate the size of the output given an input?

5 views (last 30 days)
Let's say you have an array of size [a b c] as input to a transposedConv2dLayer. What would be the output based on the stride, crop, and filter-size numbers?

Accepted Answer

Matt J
Matt J on 12 Jan 2023
Edited: Matt J on 13 Jan 2023
I believe it would be
newsize = [stride.*[a-1,b-1] + filtersize - 2*crop, numFilters]
  4 Comments
Onur Kilic
Onur Kilic on 13 Jan 2023
Thanks. Also, it seems the following edited formula gives the correct sizes for the linked example:
newsize = [stride.*[a-1,b-1] + filtersize - 2*crop, numFilters]
If you agree with this formula, can you edit your first answer so that I can accept it? Could be useful for others.

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!