-
Notifications
You must be signed in to change notification settings - Fork 80
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
Error while training using notebook #7
Comments
Same |
same |
Same. Converted tensor to Long and was welcomed with new errors |
Hi, I got the same error before and successfully run the program by changing the Pytorch version. conda install pytorch==1.2.0 torchvision==0.4.0 -c pytorch
pip install pillow=6.2.2 |
it solves my problem ,thx |
Changing the 40th line in base_layers.py file in the torchparse package works for me. |
!python run.py train -c my-config.json --cfg crnn.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()
)
Traceback (most recent call last):
File "run.py", line 176, in
train_main(config, args.resume)
File "run.py", line 85, in train_main
model = getattr(net_module, m_name)(classes, config=config)
File "/Users/dk/projects/ns/misc_git_projects/crnn-audio-classification/net/model.py", line 29, in init
self.net = parse_cfg(config['cfg'], in_shape=[in_chan, self.spec.num_mels, 400])
File "/Users/dk/py_env/ts/lib/python3.7/site-packages/torchparse/parser.py", line 139, in parse_cfg
return CFGParser(fname).get_modules(in_shape)
File "/Users/dk/py_env/ts/lib/python3.7/site-packages/torchparse/parser.py", line 120, in get_modules
model = self._flow(in_shape)
File "/Users/dk/py_env/ts/lib/python3.7/site-packages/torchparse/parser.py", line 108, in _flow
in_shape = layer.get_out_shape()
File "/Users/dk/py_env/ts/lib/python3.7/site-packages/torchparse/base_layers.py", line 40, in get_out_shape
return torch.cat([channel, spatial])
RuntimeError: Expected object of scalar type Long but got scalar type Float for sequence element 1 in sequence argument at position #1 'tensors
The text was updated successfully, but these errors were encountered: