mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Merge branch 'dev'
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
numpy>=1.16.0
|
||||
torch>=0.4.1
|
||||
torch>=1.5
|
||||
librosa>=0.5.1
|
||||
Unidecode>=0.4.20
|
||||
tensorboard
|
||||
|
||||
@@ -92,7 +92,7 @@ setup(
|
||||
},
|
||||
install_requires=[
|
||||
"scipy>=0.19.0",
|
||||
"torch>=0.4.1",
|
||||
"torch>=1.5",
|
||||
"numpy>=1.16.0",
|
||||
"librosa==0.6.2",
|
||||
"unidecode==0.4.20",
|
||||
|
||||
+9
-3
@@ -9,9 +9,15 @@ def check_update(model, grad_clip, ignore_stopnet=False):
|
||||
grad_norm = torch.nn.utils.clip_grad_norm_([param for name, param in model.named_parameters() if 'stopnet' not in name], grad_clip)
|
||||
else:
|
||||
grad_norm = torch.nn.utils.clip_grad_norm_(model.parameters(), grad_clip)
|
||||
if torch.isinf(grad_norm):
|
||||
print(" | > Gradient is INF !!")
|
||||
skip_flag = True
|
||||
# compatibility with different torch versions
|
||||
if isinstance(grad_norm, float):
|
||||
if np.isinf(grad_norm):
|
||||
print(" | > Gradient is INF !!")
|
||||
skip_flag = True
|
||||
else:
|
||||
if torch.isinf(grad_norm):
|
||||
print(" | > Gradient is INF !!")
|
||||
skip_flag = True
|
||||
return grad_norm, skip_flag
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user