Ejemplo n.º 1
0
 def __init__(self, text_encoder, config):
     super(TextImage, self).__init__()
     self.config = config
     self.TextEncoderBottom = text_encoder
     self.TextEncoderTop = TextEncoderTop(**config['TextEncoderTop'])
     self.ImageEncoder = ImageEncoder(**config['ImageEncoder'])
     self.optimizer = optim.Adam(self.parameters(), lr=config['lr'])
Ejemplo n.º 2
0
 def __init__(self, speech_encoder, config):
     super(SpeechCorrText, self).__init__()
     self.config = config
     self.SpeechEncoderBottom = speech_encoder
     self.SpeechEncoderTop = SpeechEncoderTop(**config['SpeechEncoderTop'])
     self.CorrEncoder = ImageEncoder(size=1024, size_target=1024 * 4)
     self.optimizer = optim.Adam(self.parameters(), lr=config['lr'])
Ejemplo n.º 3
0
 def __init__(self, speech_encoder, config):
     super(SpeechImage, self).__init__()
     self.config = config
     self.SpeechEncoderBottom = speech_encoder
     self.SpeechEncoderTop = SpeechEncoderTop(**config['SpeechEncoderTop'])
     self.ImageEncoder = ImageEncoder(**config['ImageEncoder'])
     self.optimizer = optim.Adam(self.parameters(), lr=config['lr'])