class CNNModel(nn.Module):
def init(self):
super(CNNModel,self).init()
#convolution 1
self.conv1=nn.Conv2d(in_channels=3,out_channels=16,kernel_size=3)
self.relu1=nn.ReLU()
self.maxpool1=nn.MaxPool2d(kernel_size=2)
#convolution2
self.conv2=nn.Conv2d(in_channels=16,out_channels=32,kernel_size=3)
self.relu2=nn.ReLU()
self.maxpool2=nn.MaxPool2d(kernel_size=2)
#convolution 3
self.conv3=nn.Conv2d(in_channels=32,out_channels=64,kernel_size=3)
self.relu3=nn.ReLU()
self.maxpool3=nn.MaxPool2d(kernel_size=2)
    #fully connected
    #self.fc1=
    def forward(self,x):
        x=self.conv1(x)
        x=self.relu1(x)
        x=self.maxpool1(x)
        x=self.conv2(x)
        x=self.relu2(x)
        x=self.maxpool2(x)
        x=self.conv3(x)
        x=self.relu3(x)
        x=self.maxpool3(x)
        #x=self.conv4(x)
        #x=self.relu4(x)
        #x=self.maxpool4(x)
        return x

model=CNNModel()
y=torch.rand(1,3,224,224)
out=model(y)
it gives error as

NotImplementedError                       Traceback (most recent call last)
 in ()
----> 1 out=model(y)
/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
489             result = self._slow_forward(*input, **kwargs)
490         else:
–> 491             result = self.forward(*input, **kwargs)
492         for hook in self._forward_hooks.values():
493             hook_result = hook(self, input, result)
/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in forward(self, *input)
81             registered hooks while the latter silently ignores them.
82         “”"
—> 83         raise NotImplementedError
84
85     def register_buffer(self, name, tensor):
NotImplementedError: