GuitarML / PedalNetRT

Deep Learning Networks for Real Time Guitar Effect Emulation using WaveNet with PyTorch
https://www.facebook.com/smartguitarml
GNU General Public License v3.0
349 stars 39 forks source link

Python error when training #29

Open jackcolt opened 2 years ago

jackcolt commented 2 years ago

Really cool stuff here. Thank you.

When running the train.py, I get the following cryptic python error. Any thoughts? I can train the LTSM models no problem using the source straight out of the repo.

Traceback (most recent call last): File "train.py", line 56, in main(args) File "train.py", line 21, in main model = PedalNet(vars(args)) File "/home/jack/PedalNetRT/model.py", line 118, in init self.hparams = hparams File "/home/jack/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1225, in setattr object.setattr(self, name, value) AttributeError: can't set attribute

mishushakov commented 2 years ago

hey, what command line arguments are you using with train.py?

jackcolt commented 2 years ago

Thanks for responding. I'm just calling with the params from the readme here in the repo.

python train.py data/ts9_test1_in_FP32.wav data/ts9_test1_out_FP32.wav

GuitarML commented 2 years ago

@jackcolt Haven't been able to reproduce what you're seeing, are you still getting this or has it been resolved?

dobell-christopher commented 2 years ago

Change line 118 in module.py from self.hparams = hparams to: self.hparams.update(hparams)

You must have a newer version of pytorch as self.hparams = hparams no longer works in the new version

JamesJieranShen commented 2 years ago

For proper model restoration, it also seems necessary to call self.save_hyperparameters() afterwards.