Error invalid syntax in pytorch nn module
I have an error in my pytorch code, and i really don't understand why.
  File &quot;&lt;ipython-input-11-89006c750b74&gt;&quot;, line 3
    def GaussianBlur(torch.nn.Module):
                          ^
SyntaxError: invalid syntax

The rest of the code is here
import torch.nn as nn
def GaussianBlur(torch.nn.Module):
    def __init__(self, kernel_size, std_dev):
        self.kernel_size = kernel_size
        self.std_dev = std_dev

    def forward(self, img):
        image = np.array(img)
        image_blur = cv2.GaussianBlur(image, self.kernel_size, self.std_dev)
        return Image.fromarray(image_blur)

Anyone knows what's going on? Thanks

def is for functions, class for classes. This should work :
class GaussianBlur(torch.nn.Module):

