예제 #1
0
 def build_model(cls, args, target_dict):
     """Build a new model instance."""
     base_architecture(args)
     w2v_encoder = Wav2VecEncoder(args, target_dict)
     return cls(w2v_encoder, args)
예제 #2
0
 def build_model(cls, args, target_dict, pretrain_args):                         # returns new instance of class # args: w2v["args"], target_dict: target_dict, pretrain_args: w2v["pretrain_args"]
     """Build a new model instance."""
     base_architecture(args)
     w2v_encoder = BrainWav2VecEncoder(args, target_dict, pretrain_args)         # w2v_encoder = BrainWav2VecEncoder(args, target_dict, pretrain_args)
     return cls(w2v_encoder, args)                                               # constructs + returns a BrainWav2VecCtc model