convert_tf_checkpoint_to_pytorch.py error
mrmutator opened this issue · comments
Hi,
When running the conversion script convert_tf_checkpoint_to_pytorch.py I get the following error when trying to convert the BERT-Base, uncased model:
Traceback (most recent call last):
File "convert_tf_checkpoint_to_pytorch.py", line 107, in <module>
convert()
File "convert_tf_checkpoint_to_pytorch.py", line 100, in convert
pointer.data = torch.from_numpy(array)
TypeError: expected np.ndarray (got numpy.ndarray)
Any ideas? Thanks
Please provide more infos about the Bert model you are using.
It worked for me in the case of BERT-Base, Uncased: 12-layer, 768-hidden, 12-heads, 110M parameters.
I'm also using the Bert model BERT-Base, Uncased: 12-layer, 768-hidden, 12-heads, 110M parameters.
But I get the error above on Windows with Pytorch 1.01 and Tensorflow 1.13.0rc2
Windows does not support some of ner-bert packages and libraries. I recommend that you implement it on linux OS or MacOS. A lot of bugs will occur if you implement it on windows.
All experiments have done on linux :).