Update train_ms.py
This commit is contained in:
@@ -38,11 +38,11 @@ from text.symbols import symbols
|
|||||||
|
|
||||||
torch.backends.cudnn.benchmark = True
|
torch.backends.cudnn.benchmark = True
|
||||||
torch.backends.cuda.matmul.allow_tf32 = True
|
torch.backends.cuda.matmul.allow_tf32 = True
|
||||||
torch.backends.cudnn.allow_tf32 = True
|
torch.backends.cudnn.allow_tf32 = True # If encontered training problem,please try to disable TF32.
|
||||||
torch.set_float32_matmul_precision('medium')
|
torch.set_float32_matmul_precision('medium')
|
||||||
torch.backends.cuda.sdp_kernel("flash")
|
torch.backends.cuda.sdp_kernel("flash")
|
||||||
torch.backends.cuda.enable_flash_sdp(True)
|
torch.backends.cuda.enable_flash_sdp(True)
|
||||||
torch.backends.cuda.enable_mem_efficient_sdp(True)
|
torch.backends.cuda.enable_mem_efficient_sdp(True) # Not avaliable if torch version is lower than 2.0
|
||||||
torch.backends.cuda.enable_math_sdp(True)
|
torch.backends.cuda.enable_math_sdp(True)
|
||||||
global_step = 0
|
global_step = 0
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ def run(rank, n_gpus, hps):
|
|||||||
|
|
||||||
epoch_str = max(epoch_str, 1)
|
epoch_str = max(epoch_str, 1)
|
||||||
global_step = (epoch_str - 1) * len(train_loader)
|
global_step = (epoch_str - 1) * len(train_loader)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
epoch_str = 1
|
epoch_str = 1
|
||||||
global_step = 0
|
global_step = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user