You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of parameters: 33428
Start training......
/usr/local/lib/python3.7/site-packages/torch/nn/modules/container.py:92: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
input = module(input)
Traceback (most recent call last):
File "main.py", line 91, in
main(config)
File "main.py", line 35, in main
solver.train()
File "/Users/linye/PycharmProjects/pytorch-StarGAN-VC/solver.py", line 160, in train
cls_loss_real = CELoss(input=cls_real, target=speaker_idx_org)
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 916, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/usr/local/lib/python3.7/site-packages/torch/nn/functional.py", line 1995, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/usr/local/lib/python3.7/site-packages/torch/nn/functional.py", line 1824, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Assertion `cur_target >= 0 && cur_target < n_classes' failed. at ../aten/src/THNN/generic/ClassNLLCriterion.c:94
I may come a little late, so just comment here for anybody else encountering this issue later on.
The original problem I guess is you are using more than 4 number of speakers. That's why there is a number 7 there in speaker_idx_org, which is supposed to contain values ranging from 0-3 only.
To fix this, reducing the number of speakers you are using in preprocess.py step.
I may come a little late, so just comment here for anybody else encountering this issue later on.
The original problem I guess is you are using more than 4 number of speakers. That's why there is a number 7 there in speaker_idx_org, which is supposed to contain values ranging from 0-3 only.
To fix this, reducing the number of speakers you are using in preprocess.py step.
Hi, sorry, just wanted to double check, so we cannot train this model for more than 4 speakers? Not having the complete understanding of the code yet but cannot it be modified for different number of speakers?
The number of parameters: 33428
Start training......
/usr/local/lib/python3.7/site-packages/torch/nn/modules/container.py:92: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
input = module(input)
Traceback (most recent call last):
File "main.py", line 91, in
main(config)
File "main.py", line 35, in main
solver.train()
File "/Users/linye/PycharmProjects/pytorch-StarGAN-VC/solver.py", line 160, in train
cls_loss_real = CELoss(input=cls_real, target=speaker_idx_org)
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 916, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/usr/local/lib/python3.7/site-packages/torch/nn/functional.py", line 1995, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/usr/local/lib/python3.7/site-packages/torch/nn/functional.py", line 1824, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Assertion `cur_target >= 0 && cur_target < n_classes' failed. at ../aten/src/THNN/generic/ClassNLLCriterion.c:94
system:MacOS
solver.py
The text was updated successfully, but these errors were encountered: