How can l add a fully convolutional layer before after max poooling layer and before the fully connected layer

Just add it.

x = self.new_conv(x)

You will probably have to use padding = floor(kernel_size / 2) in order to keep the correct size for the fc layer’s input.