Ejemplo n.º 1
0
    def __init__(self, c_in, c_out, bilinear=False):
        super(PEP, self).__init__()
        self.c_in = c_in
        self.c_out = c_out
        self.bilinear = bilinear

        self.inc = DoubleConv(self.c_in, 64)
        self.down1 = Down(64, 128)
        self.down2 = Down(128, 256)
        self.down3 = Down(256, 512)
        self.up1 = Up(768, 512, 256, self.bilinear)
        self.up2 = Up(384, 256, 128, self.bilinear)
        self.up3 = Up(192, 128, 64, self.bilinear)
Ejemplo n.º 2
0
 def __init__(self, c_in, c_out, bilinear=False, output=False):
     super(UNet, self).__init__()
     self.c_in = c_in
     self.c_out = c_out
     self.bilinear = bilinear
     self.output = output
     self.inc = DoubleConv(self.c_in, 64)
     self.down1 = Down(64, 128)
     self.down2 = Down(128, 256)
     self.down3 = Down(256, 512)
     self.up1 = Up(768, 512, 256, self.bilinear)
     self.up2 = Up(384, 256, 128, self.bilinear)
     self.up3 = Up(192, 128, 64, self.bilinear)
     if output:
         self.output_conv = nn.Conv2d(64, self.c_out, 3, padding=1)
Ejemplo n.º 3
0
    def __init__(self, c_in, c_out, bilinear=False):
        super(ERM, self).__init__()
        self.c_in = c_in
        self.c_out = c_out
        self.bilinear = bilinear

        self.inc = DoubleConv(self.c_in, 64)
        self.down1 = Down(64, 128)
        self.down2 = Down(128, 256)
        self.down3 = Down(256, 512)
        # self.inter = DoubleConv(256, 512)
        self.up1 = Up(768, 512, 256, self.bilinear)
        self.up2 = Up(384, 256, 128, self.bilinear)
        self.up3 = Up(192, 128, 64, self.bilinear)
        self.output = nn.Conv2d(64, self.c_out, 3, padding=1)

        self._init_weights()