Here is my code
# [Convolution] -> [Batch Normalization] -> [ReLU]
def Conv_block2d(in_channels,out_channels,*args,**kwargs):
	return nn.Sequential(nn.Conv2d(in_channels,out_channels,*args,**kwargs,bias=False),nn.BatchNorm2d(out_channels,eps=0.001),nn.ReLU(inplace=True))

class MainBlock(nn.Module):
    """docstring for MainBlock"nn.Module"""
    def __init__(self):
        super(MainBlock,self).__init__()

        self.pool_2x2 = nn.MaxPool2d(2,2)

        """
        size = [3,18,36,7,5]
        for in_c,out_c,k in zip(size[:2],size[1:3],size[3:]):
            print("in channel",in_c,"out channel",out_c,"kernel size",k)
            
        in channel 3 out channel 18 kernel size 7
        (256x256x3) * (7x7x18) = (250x250x18))*(2x2x1) = (125x125x18)
        in channel 18 out channel 36 kernel size 5
        (125x125x18 * (5x5x36) = (125x125x36))*(2x2x1) = (60x60x36)
        """
        self.block1_size = [3,18,36,7,5]
        self.block1_out = [self.pool_2x2(Conv_block2d(in_c,out_c,kernel_size=k)) for in_c,out_c,k in zip(self.block1_size[:2],self.block1_size[1:3],self.block1_size[3:])]
        self.block1_output = nn.Sequential(*self.block1_out)    

        self.fc = nn.Linear(60*60*36,2)

    def forward(self,x):

        
        #Block 1 output (60x60x36)
        x = self.block1_output(x)
        
        x = x.view(x.size(0),-1)

        x = self.fc(x)

        return x

Error for Maxpool i am getting

Traceback (most recent call last):
File “simpletest.py”, line 169, in 
net = MainBlock().cuda()
File “simpletest.py”, line 86, in init
self.block1_out = [self.pool_2x2(Conv_block2d(in_c,out_c,kernel_size=k)) for in_c,out_c,k in zip(self.block1_size[:2],self.block1_size[1:3],self.block1_size[3:])]
File “simpletest.py”, line 86, in 
self.block1_out = [self.pool_2x2(Conv_block2d(in_c,out_c,kernel_size=k)) for in_c,out_c,k in zip(self.block1_size[:2],self.block1_size[1:3],self.block1_size[3:])]
File “/home/ffffff/.virtualenvs/LearnPytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 477, in call
result = self.forward(*input, **kwargs)
File “/home/ffffff/.virtualenvs/LearnPytorch/lib/python3.6/site-packages/torch/nn/modules/pooling.py”, line 142, in forward
self.return_indices)
File “/home/ffffff/.virtualenvs/LearnPytorch/lib/python3.6/site-packages/torch/nn/functional.py”, line 396, in max_pool2d
ret = torch._C._nn.max_pool2d_with_indices(input, kernel_size, stride, padding, dilation, ceil_mode)
TypeError: max_pool2d_with_indices(): argument ‘input’ (position 1) must be Tensor, not Sequential

How do i include maxpool here