Fix: colab stdout error, so replace with stdout wrapper

This commit is contained in:
litagin02
2023-12-30 09:58:32 +09:00
parent f1441c35f2
commit 35a8bb514f
9 changed files with 20 additions and 16 deletions

View File

@@ -4,7 +4,6 @@ import gc
import os
import platform
import shutil
import sys
import torch
import torch.distributed as dist
@@ -29,6 +28,7 @@ from mel_processing import mel_spectrogram_torch, spec_to_mel_torch
from models import DurationDiscriminator, MultiPeriodDiscriminator, SynthesizerTrn
from text.symbols import symbols
from tools.log import logger
from tools.stdout_wrapper import get_stdout
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = (
@@ -427,7 +427,7 @@ def train_and_evaluate(
ja_bert,
en_bert,
style_vec,
) in enumerate(tqdm(train_loader, file=sys.stdout)):
) in enumerate(tqdm(train_loader, file=get_stdout())):
if net_g.module.use_noise_scaled_mas:
current_mas_noise_scale = (
net_g.module.mas_noise_scale_initial