Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: optimizer got an empty parameter list #3

Open
florian-hoenicke opened this issue Sep 13, 2019 · 1 comment
Open

ValueError: optimizer got an empty parameter list #3

florian-hoenicke opened this issue Sep 13, 2019 · 1 comment

Comments

@florian-hoenicke
Copy link

Hi, when I try to train the model, I get the following output. Any idea how to handle it?
./run.py train -c config.json --cfg arch.cfg

Compose(
ProcessChannels(mode=avg)
AdditiveNoise(prob=0.3, sig=0.001, dist_type=normal)
RandomCropLength(prob=0.4, sig=0.25, dist_type=half)
ToTensorAudio()
)
AudioCRNN(
(spec): MelspectrogramStretch(num_mels=128, fft_length=2048, norm=spec_whiten, stretch_param=[0.4, 0.4])
(net): ModuleDict(
(main): Sequential()
)
)
Trainable parameters: 0
Traceback (most recent call last):
File "./run.py", line 176, in
train_main(config, args.resume)
File "./run.py", line 97, in train_main
optimizer = getattr(torch.optim, opt_name)(trainable_params, **opt_args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/optim/adam.py", line 42, in init
super(Adam, self).init(params, defaults)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/optim/optimizer.py", line 46, in init
raise ValueError("optimizer got an empty parameter list")
ValueError: optimizer got an empty parameter list

@mathematiguy
Copy link

I figured this one out. The .cfg file included in the repo is crnn.cfg, not arch.cfg. I'll put through a PR to the readme file to fix this.

mathematiguy added a commit to mathematiguy/crnn-audio-classification that referenced this issue Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants