def Build(self): sequence_input = Input((self.encoder_frames_no, 128, 128, 3), self.batch_size, name="nvae_seq_input") mask_input = Input((128, 128, 1), self.batch_size, name="nvae_mask_input") encoder_output = self.encoder_model(sequence_input) self.mean_4x4x512 = encoder_output[0] self.stddev_4x4x512 = encoder_output[1] self.mean_8x8x256 = encoder_output[2] self.stddev_8x8x256 = encoder_output[3] self.mean_16x16x128 = encoder_output[4] self.stddev_16x16x128 = encoder_output[5] self.mean_32x32x64 = encoder_output[6] self.stddev_32x32x64 = encoder_output[7] self.mean_64x64x32 = encoder_output[8] self.stddev_64x64x32 = encoder_output[9] mask_encoder_output = self.mask_encoder_model(mask_input) self.mask4x4x512 = mask_encoder_output[0] self.mask8x8x256 = mask_encoder_output[1] self.mask16x16x128 = mask_encoder_output[2] self.mask32x32x64 = mask_encoder_output[3] self.mask64x64x32 = mask_encoder_output[4] decoder_output = self.decoder_model(encoder_output + mask_encoder_output) net = DummyMaskLayer()(decoder_output) return Model(inputs=[sequence_input, mask_input], outputs=net)
def Build(self): sequence_inputs, sequence_outputs = self.sequence_encoder.layers() mean, stddev = sequence_outputs detail_input = Input((128, 128, 3), self.batch_size, name="detail_input") mask_input = Input((128, 128, 1), self.batch_size, name="mask_input") decoder_inputs, decoder_outputs = self.face_decoder.layers( mean, stddev, detail_input, mask_input) net = DummyMaskLayer()(decoder_outputs) return Model(inputs=[sequence_inputs, detail_input, mask_input], outputs=net)
def Build(self): sequence_input = Input((self.encoder_frames_no, 128, 128, 3), self.batch_size) detail_input = Input((128, 128, 3), self.batch_size) mask_input = Input((self.decoder_frames_no, 128, 128, 1), self.batch_size) encoder_output = self.encoder_model(sequence_input) mean, stddev = tuple(encoder_output) decoder_output = self.decoder_model( [mean, stddev, detail_input, mask_input]) net = DummyMaskLayer()(decoder_output) return Model(inputs=[sequence_input, detail_input, mask_input], outputs=net)
def Build(self): encoder_inputs, encoder_outputs = self.encoder.layers decoder_inputs, decoder_outputs = self.decoder.layers net = DummyMaskLayer()(decoder_outputs) return Model(inputs=encoder_inputs, outputs=net)