How to define a deconvolution layer?

Hii

I’m new in pytorch, any help will be appreciated.
I want to use deconvolution to estimate an image for 1-D feature. The same as DWT (discrete wavelet transform).

Thnx

torch.nn.ConvTranspose2d can do unsampling and can be regarded as a deconvolution operation.

5 Likes

Thnx for reply

I tried modifying this code but it gives me error.

    self.layer1 = nn.Sequential(
        nn.Conv2d(1, 16, kernel_size=5, padding=2),
        nn.BatchNorm2d(16),
        nn.ReLU(),
        nn.MaxPool2d(2))

Kindly, can u modify this code so it can be used for deconvolution?

do you have a code example?