bert_document_classification
bert_document_classification copied to clipboard
cannot import name '_VF'
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'
@Jheel-patel did you have any news about this issue? I got the same here.
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.