ConvBlock import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding=0, stride=1): super(ConvBlock, self).__init__() self.layers = nn.Sequential( nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, padding=padding, stride=stride), nn.ReLU() ) def __call__(self, x): x = self.layers(x) return ..