mirror of
https://github.com/wassname/TTS.git
synced 2026-10-29 12:51:00 +08:00
Add init_from_config to GAN
This commit is contained in:
1 parent
353f913efc
commit
e1b4c4ca43
1 file changed
+4
@@ -361,3 +361,7 @@ class GAN(BaseVocoder):
|
||||
def get_criterion(self):
|
||||
"""Return criterions for the optimizers"""
|
||||
return [GeneratorLoss(self.config), DiscriminatorLoss(self.config)]
|
||||
|
||||
@staticmethod
|
||||
def init_from_config(config: Coqpit) -> "GAN":
|
||||
return GAN(config)
|
||||
Reference in new issue
Block a user