Tied Deconvolution

Hello everyone, I’m new to pyTorch.
Is there a way to define a deconvolution layer that takes its weights (conv. filters) from a previous convolutional layer?

In pseudo-code:

x=conv2d(W,x)
x=convTransponse2d(W.T,x)

For reference, I’m trying to implement this network:
http://ieeexplore.ieee.org/document/7962256/

1 Like

I think nn.functional will give you the answer.

Like

import torch.nn.functional as F
x = F.conv2d(x, W)
x = F.conv_transpose2d(x, W.t())
2 Likes

Nice! Thanks for the fast reply :wink: