Question: Applies low pass filter to the input image. Args: x: Tensor of shape ( b , c , m , n ) where b is
Applies low pass filter to the input image.
Args:
x: Tensor of shape b c m n where b is batch size
kernel: low pass filter to be applied to the image
Returns:
filteredimage: Tensor of shape b c m n
HINTS:
You should use the d convolution operator from torch.nnfunctional.
Make sure to pad the image appropriately its a parameter to the
convolution function you should use here!
Pass self.nchannels as the value to the "groups" parameter of the
convolution function. This represents the # of channels that the
filter will be applied to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
