An error occurs when using google colab: NameError: name 'data_iter' is not defined

#1
by nstudio - opened

An error occurs at the training stage:

python3 beatrice_trainer -d /home/u47403/AI/beatrice-trainer/data/ -o /home/u47403/AI/beatrice-trainer/output/
device=cuda
config:
{'adam_betas': [0.8, 0.99],
'adam_eps': 1e-06,
'batch_size': 8,
'grad_balancer_ema_decay': 0.995,
'grad_weight_adv': 1.0,
'grad_weight_fm': 1.0,
'grad_weight_mel': 1.0,
'hidden_channels': 256,
'in_ir_wav_dir': 'assets/ir',
'in_noise_wav_dir': 'assets/noise',
'in_sample_rate': 16000,
'in_test_wav_dir': 'assets/test',
'learning_rate': 0.0001,
'min_learning_rate': 5e-06,
'n_steps': 20000,
'num_workers': 16,
'out_sample_rate': 24000,
'phone_extractor_file': 'assets/pretrained/003b_checkpoint_03000000.pt',
'pitch_estimator_file': 'assets/pretrained/008_1_checkpoint_00300000.pt',
'pretrained_file': 'assets/pretrained/040c_checkpoint_libritts_r_200_02300000.pt',
'san': False,
'segment_length': 100,
'use_amp': True,
'warmup_steps': 10000,
'wav_length': 96000}

n_speakers=2
0: itashi
1: nastya

len(training_filelist)=2
len(test_filelist)=8
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38833628_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38843402_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38852485_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38853932_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38864552_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38878413_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38898180_16k.wav, [0, 1]
/home/u47403/AI/beatrice-trainer/assets/test/common_voice_ja_38925334_16k.wav, [0, 1]

Computing mean F0s of target speakers...
0: 245.9Hz, 1: 177.0Hz,
Done.
Computing pitch shifts for test files...
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 8/8 [00:21<00:00, 2.73s/it]
Done.
/home/u47403/.cache/pypoetry/virtualenvs/beatrice-trainer-xFkHvtrh-py3.10/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")




Using cache found in /home/u47403/.cache/torch/hub/tarepan_SpeechMOS_v1.0.0
/home/u47403/.cache/pypoetry/virtualenvs/beatrice-trainer-xFkHvtrh-py3.10/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
0%| | 0/20000 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/u47403/AI/beatrice-trainer/beatrice_trainer/__main__.py", line 2641, in
batch = next(data_iter)
NameError: name 'data_iter' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u47403/miniforge3/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/u47403/miniforge3/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/u47403/AI/beatrice-trainer/beatrice_trainer/main.py", line 2644, in
batch = next(data_iter)
File "/home/u47403/.cache/pypoetry/virtualenvs/beatrice-trainer-xFkHvtrh-py3.10/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/home/u47403/.cache/pypoetry/virtualenvs/beatrice-trainer-xFkHvtrh-py3.10/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1319, in _next_data
raise StopIteration
StopIteration

Sign up or log in to comment