question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot set ngpu=1 to recog_wav.sh

See original GitHub issue

We could run “run.sh --ngpu 1” and “recog_wav.sh --ngpu 0”, but cannot run “recog_wav.sh --ngpu 1”. How can we do? Here is the log. Thank you.

cat decode/gu_csj/log/decode.log
\# asr_recog.py --config conf/decode.yaml --ngpu 1 --backend pytorch --debugmode 1 --verbose 1 --recog-json decode/gu_csj/dump/data.json --result-label decode/gu_csj/result.json --model exp/train_nodup_sp_pytorch_train/results/model.acc.best --rnnlm exp/train_rnnlm_pytorch_lm/rnnlm.model.best 
\# Started at Thu Aug 22 15:21:25 JST 2019
\#
2019-08-22 15:21:25,711 (asr_recog:126) WARNING: CUDA_VISIBLE_DEVICES is not set.
2019-08-22 15:21:25,711 (asr_recog:137) INFO: python path = (None)
2019-08-22 15:21:25,711 (asr_recog:142) INFO: set random seed = 1
2019-08-22 15:21:25,711 (asr_recog:150) INFO: backend = pytorch
/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
2019-08-22 15:21:26,395 (deterministic_utils:24) INFO: torch type check is disabled
2019-08-22 15:21:26,395 (asr_utils:361) INFO: reading a config file from exp/train_nodup_sp_pytorch_train/results/model.json
2019-08-22 15:21:26,396 (asr:266) INFO: reading model parameters from exp/train_nodup_sp_pytorch_train/results/model.acc.best
/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='none' instead.
  warnings.warn(warning.format(ret))
2019-08-22 15:21:26,718 (asr_utils:361) INFO: reading a config file from exp/train_rnnlm_pytorch_lm/model.json
2019-08-22 15:21:26,840 (asr:595) INFO: gpu id: [0]
2019-08-22 15:21:35,421 (asr:614) INFO: (1/1) decoding gu_csj
Traceback (most recent call last):
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/egs/csj/asr1/../../../espnet/bin/asr_recog.py", line 169, in <module>
    main(sys.argv[1:])
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/egs/csj/asr1/../../../espnet/bin/asr_recog.py", line 157, in main
    recog(args)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/espnet/asr/pytorch_backend/asr.py", line 647, in recog
    nbest_hyps = model.recognize(feat, args, train_args.char_list, rnnlm)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/espnet/nets/pytorch_backend/e2e_asr_transformer.py", line 225, in recognize
    enc_output, _ = self.encoder(feat, None)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/espnet/nets/pytorch_backend/transformer/encoder.py", line 109, in forward
    xs, masks = self.embed(xs, masks)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/espnet/nets/pytorch_backend/transformer/subsampling.py", line 36, in forward
    x = self.conv(x)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
    input = module(input)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/robothub/hdd_mount/espnet0.5.0/espnet/tools/venv/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 320, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same
\# Accounting: time=10 threads=1
\# Ended (code 1) at Thu Aug 22 15:21:35 JST 2019, elapsed time 10 seconds

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
robothubtokyocommented, Aug 24, 2019

We confirmed that it works normally. Thank you!

0reactions
kan-bayashicommented, Aug 24, 2019

I believe fixed in #1133. Thank you for your reports!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found