Use conv2d as a function

I have a one-layer network defined by nn.ConvTranspose2d(). Now I need to change the parameter of this network (weight, bias), and re-evaluate the output w.r.t the original input. But I still need to maintain the original network. All I need is the output w.r.t new parameter. Then work on the original network with old parameter.

Is that possible that I still use nn.ConvTranspose2d() to realize it? If not what other function can I use?

Use the functional interfact: torch.nn.functional.conv_transpose2d

Is there any tutorial about how to use it? If the module is nn.ConvTranspose2d(d, 1, 8, stride=2), I get the weight and bias of this network, and plan to apply it to an input. Is torch.nn.functional.conv_transpose2d(input, weight, bias) right? Or I need to specify some parameters. Thanks

Yes you need to specify the stride as well. The documentation is pretty clear.

It works. Thanks a lot