コード例 #1
0
    def __init__(self, args):
        super(cnn_TR2, self).__init__()

        self.cnn_1 = cnn()
        self.cnn_2 = cnn()
        self.tr_1 = TR(args, (24, 8, 8), 64)
        self.tr_2 = TR(args, (24, 8, 8), 64)
        self.final = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                   nn.Linear(64, 32), nn.ReLU(),
                                   nn.Linear(32, 2))
コード例 #2
0
    def __init__(self, args):
        super(cnn_test2, self).__init__()

        self.cnn_1 = cnn()
        self.cnn_2 = cnn()
        self.tr_1 = TR(args, (24, 8, 8), 64)
        self.sf_1 = SF(args, (24, 8, 8), 64)
        self.tr_2 = TR(args, (24, 8, 8), 64)
        self.sf_2 = SF(args, (24, 8, 8), 64)
        self.af_1 = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                  nn.Linear(64, 64), nn.ReLU())
        self.af_2 = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                  nn.Linear(64, 64), nn.ReLU())
        self.final = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                   nn.Linear(64, 32), nn.ReLU(),
                                   nn.Dropout(p=0.1), nn.Linear(32, 2))
コード例 #3
0
    def __init__(self, args, fourier):
        super(res_TR, self).__init__()

        self.conv = transfer_img(fourier)
        self.resnet = resnet50_F()
        self.cnn_c = cnn_C()
        self.tr = TR(args, (24, 8, 8), 2)
コード例 #4
0
    def __init__(self, args):
        super(cnn_test, self).__init__()

        self.cnn = cnn()
        self.tr = TR(args, (24, 8, 8), 64)
        self.sf = SF(args, (24, 8, 8), 64)
        self.final = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                   nn.Linear(64, 32), nn.ReLU(),
                                   nn.Linear(32, 2))
コード例 #5
0
    def __init__(self, args, fourier):
        super(res_test, self).__init__()

        self.conv = transfer_img(fourier)
        self.resnet = resnet50_F()
        self.tr = TR(args, (24, 8, 8), 64)
        self.sf = SF(args, (24, 8, 8), 64)
        self.cnn_c = cnn_C()

        self.final = nn.Sequential(nn.Linear(128, 64), nn.ReLU(),
                                   nn.Linear(64, 32), nn.ReLU(),
                                   nn.Linear(32, 2))
コード例 #6
0
    def __init__(self, args):
        super(res_TR, self).__init__()

        self.resnet = resnet50()
        self.tr = TR(args, (24, 8, 8), 2)