yuzhimanhua/Multi-BioNER

ValueError: could not convert string to float: '-0\x00\x00\

YuliaInn opened this issue · 3 comments

I tried to reproduce your experiment from the paper. However, I got this:

loading embedding
/home/iid49/Multi-BioNER/model/utils.py:779: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform_.
nn.init.uniform(input_embedding, -bias, bias)
Traceback (most recent call last):
File "train_wc.py", line 169, in
f_map, embedding_tensor, in_doc_words = utils.load_embedding_wlm(args.emb_file, ' ', f_map, dt_f_set, args.caseless, args.unk, args.word_dim, shrink_to_corpus=args.shrink_embedding)
File "/home/iid49/Multi-BioNER/model/utils.py", line 403, in load_embedding_wlm
vector = list(map(lambda t: float(t), filter(lambda n: n and not n.isspace(), line[1:])))
File "/home/iid49/Multi-BioNER/model/utils.py", line 403, in
vector = list(map(lambda t: float(t), filter(lambda n: n and not n.isspace(), line[1:])))
ValueError: could not convert string to float: '-0\x00....

how do I fix it?

thank you

HI, could you tell me what embedding you are using?

I am using the data for "Quick Start" which has wikipedia-pubmed-and-pmc-w2v.txt file. Is that the right one?

Sorry for the late reply. Yes, you are using the right one. I am not sure why you got that execution error.

Could you please refer to the embedding files in

https://github.com/BaderLab/Transfer-Learning-BNER-Bioinformatics-2018

or

http://bio.nlplab.org/#word-vectors

?