mirror of
https://github.com/coqui-ai/TTS.git
synced 2026-07-11 04:51:29 +02:00
wavernn load_checkpoint function
This commit is contained in:
@@ -499,3 +499,10 @@ class WaveRNN(nn.Module):
|
||||
unfolded[start:end] += y[i]
|
||||
|
||||
return unfolded
|
||||
|
||||
def load_checkpoint(self, config, checkpoint_path, eval=False): # pylint: disable=unused-argument
|
||||
state = torch.load(checkpoint_path, map_location=torch.device('cpu'))
|
||||
self.load_state_dict(state['model'])
|
||||
if eval:
|
||||
self.eval()
|
||||
assert not self.training
|
||||
|
||||
Reference in New Issue
Block a user