Пример #1
0
    def __init__(self, hp):
        super(FUNITModel, self).__init__()
        self.gen_a = FewShotGen(hp['gen_a'])  # human domain Generator
        self.gen_b = FewShotGen(hp['gen_b'])  # anime domain Generator
        self.dis_a = GPPatchMcResDis(hp['dis_a'])  # human domain Discriminator
        self.dis_b = GPPatchMcResDis(hp['dis_b'])  # anime domain Discriminator

        self.gen_test_a = copy.deepcopy(self.gen_a)
        self.gen_test_b = copy.deepcopy(self.gen_b)
Пример #2
0
 def __init__(self, hp):
     super(SEMIT, self).__init__()
     self.gen = FewShotGen(hp['gen'])
     self.dis = GPPatchMcResDis(hp['dis'])
     self.gen_test = copy.deepcopy(self.gen)
     self.pooling_hf = Avgpool()
     self.logsoftmax_hf = nn.LogSoftmax(dim=1).cuda()
     self.softmax_hf = nn.Softmax(dim=1).cuda()
     self.pooling_lf = Avgpool(kernel_size=2, stride=2)
     self.logsoftmax_lf = nn.LogSoftmax(dim=1).cuda()
     self.softmax_lf = nn.Softmax(dim=1).cuda()
Пример #3
0
 def __init__(self, hp):
     super(FUNITModel, self).__init__()
     self.gen = FewShotGen(hp['gen'])
     self.dis = GPPatchMcResDis(hp['dis'])
     self.gen_test = copy.deepcopy(self.gen)