babysor / babysor/MockingBird

训练时出现这个错误

Open
#219 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

(mockingbird) K:\mb>python synthesizer_train.py 75k k:/mb/datame/SV2TTS/synthesizer -b 1000
Arguments:
run_id: 75k
syn_dir: k:/mb/datame/SV2TTS/synthesizer
models_dir: synthesizer/saved_models/
save_every: 1000
backup_every: 1000
log_every: 200
force_restart: False
hparams:

Checkpoint path: synthesizer\saved_models\75k\75k.pt
Loading training data from: k:\mb\datame\SV2TTS\synthesizer\train.txt
Using model: Tacotron
Using device: cpu

Initialising Tacotron Model...

Trainable Parameters: 32.869M

Loading weights at synthesizer\saved_models\75k\75k.pt
Tacotron weights loaded from step 93000
Using inputs from:
k:\mb\datame\SV2TTS\synthesizer\train.txt
k:\mb\datame\SV2TTS\synthesizer\mels
k:\mb\datame\SV2TTS\synthesizer\embeds
Found 12 samples
+----------------+------------+---------------+------------------+
| Steps with r=2 | Batch Size | Learning Rate | Outputs/Step (r) |
+----------------+------------+---------------+------------------+
| 67k Steps | 12 | 5e-06 | 2 |
+----------------+------------+---------------+------------------+

K:\mb\synthesizer\synthesizer_dataset.py:84: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ..\torch\csrc\utils\tensor_new.cpp:201.)
embeds = torch.tensor(embeds)
f:\anaconda3\envs\mockingbird\lib\site-packages\torch\nn\functional.py:1795: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
Traceback (most recent call last):
File "synthesizer_train.py", line 37, in
train(**vars(args))
File "K:\mb\synthesizer\train.py", line 208, in train
optimizer.step()
File "f:\anaconda3\envs\mockingbird\lib\site-packages\torch\optim\optimizer.py", line 88, in wrapper
return func(*args, **kwargs)
File "f:\anaconda3\envs\mockingbird\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "f:\anaconda3\envs\mockingbird\lib\site-packages\torch\optim\adam.py", line 133, in step
F.adam(params_with_grad,
File "f:\anaconda3\envs\mockingbird\lib\site-packages\torch\optim\_functional.py", line 86, in adam
exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1)
RuntimeError: The size of tensor a (1024) must match the size of tensor b (3) at non-singleton dimension 3

这个模型用的是主页提供的75k steps模型

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with synthesizer_train.py and follow the training flow into synthesizer/train.py, especially the optimizer.step() call at line 208. Compare the 75k checkpoint loading path and the dataset tensor construction in synthesizer_dataset.py with the reported Adam tensor-shape mismatch. Done means identifying the incompatible tensors or setup and confirming that training can proceed with the supplied 75k model.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.