예제 #1
0
 def list_params(cls, expected_params=None):
     print("San Encoder:")
     SanEncoderEstimator.list_params(expected_params)
     print()
     print("Seq2Seq Decoder:")
     Seq2SeqDecoderEstimator.list_params(expected_params)
     print()
예제 #2
0
 def __init__(self, model_dir="/tmp", params=dict(), config=None, scope="", is_mmi_model=False):
     self.encoder = SanEncoderEstimator(
         model_dir, params, config=config, scope=scope+"/encoder")
     self.decoder = Seq2SeqDecoderEstimator(
         model_dir, params, config=config, scope=scope+"/decoder", is_mmi_model=is_mmi_model)
     super().__init__([self.encoder, self.decoder],
                      model_dir, params, config, scope)
예제 #3
0
 def __init__(self, model_dir, params, config=None, scope="default"):
     self.core_encoder = Seq2SeqEncoderEstimator(model_dir, params, scope="core_encoder")
     self.ae_encoder = Seq2SeqEncoderEstimator(model_dir, params, scope="ae_encoder")
     self.noise = NoiseLayer(model_dir, params, scope="noise")
     self.decoder = Seq2SeqDecoderEstimator(model_dir, params, scope="decoder")
     self.core_model = EstimatorChain([self.core_encoder, self.decoder], model_dir, params, scope="core")
     self.noisy_core_model = EstimatorChain([self.core_encoder, self.noise, self.decoder], model_dir, params, scope="noisy_core")
     self.autoencoder = EstimatorChain([self.ae_encoder, self.noise, self.decoder], model_dir, params, scope="ae")
     self.loss_balance = [1.0, 1.0, 1.0, 1.0]
     super().__init__([self.core_model, self.noisy_core_model, self.autoencoder], model_dir, params, config=config, scope=scope)