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

TypeError: ('Unrecognized rnn type: ', 'qrnn') #93

Open
delip opened this issue Mar 17, 2020 · 8 comments
Open

TypeError: ('Unrecognized rnn type: ', 'qrnn') #93

delip opened this issue Mar 17, 2020 · 8 comments

Comments

@delip
Copy link

delip commented Mar 17, 2020

I am following the example set in the README, and I am getting the following error. Is this familiar to anyone?

In [1]: from pase.models.frontend import wf_builder                                                                                            

In [2]: pase = wf_builder('pase_models/cfg/frontend/PASE+.cfg').eval()                                                                         
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-8accba11a31c> in <module>
----> 1 pase = wf_builder('pase_models/cfg/frontend/PASE+.cfg').eval()

/opt/conda/lib/python3.6/site-packages/PASE-0.1.1.dev0-py3.6.egg/pase/models/frontend.py in wf_builder(cfg_path)
    21             with open(cfg_path, 'r') as cfg_f:
    22                 cfg = json.load(cfg_f)
---> 23                 return wf_builder(cfg)
    24         elif isinstance(cfg_path, dict):
    25             if "name" in cfg_path.keys():

/opt/conda/lib/python3.6/site-packages/PASE-0.1.1.dev0-py3.6.egg/pase/models/frontend.py in wf_builder(cfg_path)
    34                     raise TypeError('Unrecognized frontend type: ', model_name)
    35             else:
---> 36                 return WaveFe(**cfg_path)
    37         else:
    38             TypeError('Unexpected config for WaveFe')

/opt/conda/lib/python3.6/site-packages/PASE-0.1.1.dev0-py3.6.egg/pase/models/frontend.py in __init__(self, num_inputs, sincnet, kwidths, strides, dilations, fmaps, norm_type, pad_mode, sr, emb_dim, rnn_dim, activation, rnn_pool, rnn_layers, rnn_dropout, rnn_type, vq_K, vq_beta, vq_gamma, norm_out, tanh_out, resblocks, denseskips, densemerge, name)
   192                                        rnn_type=rnn_type,
   193                                        bidirectional=True,
--> 194                                        dropout=rnn_dropout)
   195             self.W = nn.Conv1d(rnn_dim, emb_dim, 1)
   196         else:

/opt/conda/lib/python3.6/site-packages/PASE-0.1.1.dev0-py3.6.egg/pase/models/modules.py in build_rnn_block(in_size, rnn_size, rnn_layers, rnn_type, bidirectional, dropout, use_cuda)
    57                                             bidirectional=bidirectional)
    58     else:
---> 59         raise TypeError('Unrecognized rnn type: ', rnn_type)
    60     return rnn
    61 

TypeError: ('Unrecognized rnn type: ', 'qrnn')
@jcvasquezc
Copy link

I experienced the same error. I think it is something related with the installation of git+https://github.com/salesforce/pytorch-qrnn and cupy-cuda101

@delip
Copy link
Author

delip commented Mar 17, 2020

@jcvasquezc were you able to find a workaround for this?

@MittalShruti
Copy link

as @jcvasquezc said, you need to install cupy (your cuda version) + https://github.com/salesforce/pytorch-qrnn

^this resolves the error

@santi-pdp
Copy link
Owner

Hi @delip ,
indeed as others correctly point out, you need to install a proper cupy version (in the requirements.txt you'll see the cuda 10.1 version cupy-cuda101, adjust as needed like cupy-cuda100 for your setup ) in addition to the official Pytorch QRNN repo.

@delip
Copy link
Author

delip commented Mar 20, 2020

Thanks, @jcvasquezc, @MittalShruti, and @santi-pdp!

@delip delip closed this as completed Mar 20, 2020
@delip delip reopened this Mar 21, 2020
@delip
Copy link
Author

delip commented Mar 21, 2020

I am running into QRNN issues that I've documented here. Is there a recommended commit of the QRNN code that has worked for others?

@palashmoon
Copy link

Hi @delip @santi-pdp.. can you pleas help??
i am still getting this error when when i have use cupy-cuda and cudaversion same.
Traceback (most recent call last):
File "./scripts/feature_extraction/dvlog/extract_audio_pase_embeddings.py", line 49, in
pase = wf_builder(args.config_file).to(args.cuda_device).eval()
File "/opt/conda/lib/python3.8/site-packages/PASE-0.1.1.dev0-py3.8.egg/pase/models/frontend.py", line 23, in wf_builder
File "/opt/conda/lib/python3.8/site-packages/PASE-0.1.1.dev0-py3.8.egg/pase/models/frontend.py", line 36, in wf_builder
File "/opt/conda/lib/python3.8/site-packages/PASE-0.1.1.dev0-py3.8.egg/pase/models/frontend.py", line 190, in init
File "/opt/conda/lib/python3.8/site-packages/PASE-0.1.1.dev0-py3.8.egg/pase/models/modules.py", line 59, in build_rnn_block
TypeError: ('Unrecognized rnn type: ', 'qrnn')

@AllSimilar
Copy link

I have the same problem. Have you solved this? @palashmoon

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

6 participants