No module named 'torch.tensor'
See original GitHub issueHi, I wrote the correct code a few weeks ago and run on Colab, it works well. Now I want to reuse the code. Right now the basic code could not running, is it a PyTorch upgrade or something else
import torch print(torch.hub.list('s3prl/s3prl')) print(torch.hub.load('s3prl/s3prl', 'audio_albert'))
the error is
` [hubconf] can not import upstream.wav2vec2_hug.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.roberta.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.apc.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.spec_augment.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.hubert.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.wav2vec.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.vq_apc.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.mockingjay.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.example.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.tera.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.vq_wav2vec.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.npc.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.audio_albert.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.baseline.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.pase.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.wav2vec2.hubconf: No module named ‘torch.tensor’… Pass. [hubconf] can not import upstream.cpc.hubconf: No module named ‘torch.tensor’… Pass. Using cache found in /root/.cache/torch/hub/s3prl_s3prl_master
RuntimeError Traceback (most recent call last) <ipython-input-6-ba07a714d0f8> in <module>() ----> 1 print(torch.hub.load(‘s3prl/s3prl’, ‘audio_albert’))
2 frames /usr/local/lib/python3.7/dist-packages/torch/hub.py in load(repo_or_dir, model, *args, **kwargs) 362 repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, verbose) 363 –> 364 model = _load_local(repo_or_dir, model, *args, **kwargs) 365 return model 366
/usr/local/lib/python3.7/dist-packages/torch/hub.py in _load_local(hubconf_dir, model, *args, **kwargs) 390 hub_module = import_module(MODULE_HUBCONF, hubconf_path) 391 –> 392 entry = _load_entry_from_hubconf(hub_module, model) 393 model = entry(*args, **kwargs) 394
/usr/local/lib/python3.7/dist-packages/torch/hub.py in _load_entry_from_hubconf(m, model) 210 211 if func is None or not callable(func): –> 212 raise RuntimeError(‘Cannot find callable {} in hubconf’.format(model)) 213 214 return func
RuntimeError: Cannot find callable audio_albert in hubconf `
thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Hi, When I saw that the middle three layers had the same value and the dictionary key was named “hidden_state_XX”, I thought this was the weight for the middle layer.
I recommend that writing a document or a demo tells us what the values mean of each key is and how to calculate it, and so far I’ve only found a brief introduction in the introduction. It would be better if you could also let me know how the list features of the previous version were calculated by this version. I lost 2 points of accuracy for the features of the two versions, which was about 4 points higher than that of SOTA before, but now it is 2% higher.
The idea of the features of middle layers contains in a dict that can be used by the users is great! Thank you and the team for the work!
Thanks!
Hey!
This issue is resolved in the latest master. Thanks for your patient!