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

cannot import name '_VF' #18

Open
Jheel-patel opened this issue Dec 7, 2020 · 2 comments
Open

cannot import name '_VF' #18

Jheel-patel opened this issue Dec 7, 2020 · 2 comments

Comments

@Jheel-patel
Copy link

Receiving following error on running

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-10-19a3cb46662e> in <module>()
----> 1 from bert_document_classification.models import SmokerPhenotypingBert
      2 from bert_document_classification.models import ObesityPhenotypingBert
      3 
      4 smoking_classifier = SmokerPhenotypingBert(device='cuda', batch_size=10) #defaults to GPU prediction
      5 

4 frames
/usr/local/lib/python3.6/dist-packages/bert_document_classification/transformer.py in <module>()
     13 from torch.nn.init import xavier_normal_
     14 from torch.nn.parameter import Parameter
---> 15 from torch.nn import _VF
     16 
     17 def _get_softmax_dim(name, ndim, stacklevel):

ImportError: cannot import name '_VF'
@antonioFlavio
Copy link

@Jheel-patel did you have any news about this issue? I got the same here.

@iamhere1
Copy link

I got the same error when running with torch version 1.6.0. When I change to use the torch version 1.4.0, the problem was solved.

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

3 participants