Exemple #1
0
 def __init__(self, oc, use_bn=False):
     super().__init__()
     self.conv1x1 = conv(oc, oc, 1)
     if use_bn:
         self.bblock = nn.Sequential(conv(oc, oc, 3), nn.BatchNorm2d(oc), relu(), conv(oc, oc, 3, bias=False))
     else:
         self.bblock = nn.Sequential(conv(oc, oc, 3), relu(), conv(oc, oc, 3, bias=False))  # Basic block
Exemple #2
0
    def __init__(self, fc, ic, oc):
        super().__init__()

        nc = ic + oc
        self.reduce = nn.Sequential(conv(fc, oc, 1), relu(), conv(oc, oc, 1))
        self.transform = nn.Sequential(conv(nc, nc, 3),
                                       relu(), conv(nc, nc, 3), relu(),
                                       conv(nc, oc, 3), relu())
Exemple #3
0
    def __init__(self, oc, deepest):
        super().__init__()

        self.convreluconv = nn.Sequential(conv(2 * oc, oc, 1), relu(), conv(oc, oc, 1))
        self.deepest = deepest