def __init__(self, output_nc=1): self.conv1 = ConvLayer(16, kernel=3) self.conv2 = ConvLayer(32, kernel=3) # 1st branch self.branch1x1 = ConvLayer(64, kernel=1) # 2nd branch self.branch3x3 = nn.Sequential(('conv1', ConvLayer(48, kernel=1)), ('conv2', ConvLayer(64, kernel=3))) # 3rd branch self.branch5x5 = nn.Sequential(('conv1', ConvLayer(64, kernel=1)), ('conv2', ConvLayer(96, kernel=5))) # 4th branch self.branch_pool = nn.Sequential(('max_pooling', MaxPooling(kernel=3)), ('conv1', ConvLayer(32, kernel=1)))
def __init__(self): self.conv1 = ConvLayer(8, kernel=3) self.conv_block2 = DoubleConvUnit(16, 32) self.conv_block3 = nn.Sequential(ConvLayer(64, kernel=3), DoubleConvUnit(16, 196))
def __init__(self): self.conv1 = ConvLayer(8, kernel=3) self.conv_block2 = DoubleConvUnit(16, 32) self.conv_block3 = nn.Sequential( ('single_conv', ConvLayer(64, kernel=3)), ('double_conv', DoubleConvUnit(16, 196)))
def DoubleConvUnit(i1, i2): double_conv_layer = nn.Sequential(ConvLayer(i1, kernel=3), ConvLayer(i2, kernel=3)) return double_conv_layer