Skip to content

Commit

Permalink
Change the Samplers weights to float for save memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson committed Feb 11, 2022
1 parent 525eb93 commit e8d710f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TTS/tts/utils/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ def get_language_balancer_weights(items: list):
dataset_samples_weight = np.array([weight_language[l] for l in language_ids])
# normalize
dataset_samples_weight = dataset_samples_weight / np.linalg.norm(dataset_samples_weight)
return torch.from_numpy(dataset_samples_weight).double()
return torch.from_numpy(dataset_samples_weight).float()
2 changes: 1 addition & 1 deletion TTS/tts/utils/speakers.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,4 @@ def get_speaker_balancer_weights(items: list):
dataset_samples_weight = np.array([weight_speaker[l] for l in speaker_ids])
# normalize
dataset_samples_weight = dataset_samples_weight / np.linalg.norm(dataset_samples_weight)
return torch.from_numpy(dataset_samples_weight).double()
return torch.from_numpy(dataset_samples_weight).float()

0 comments on commit e8d710f

Please sign in to comment.