nqg icon indicating copy to clipboard operation
nqg copied to clipboard

Invalid literal for float

Open subhammahanta777 opened this issue 7 years ago • 3 comments

After doing:

python preprocess_embedding.py --embedding data/qg-train.t7 --dict data/qg.src.dict --output data/qg.src.840B.300d.npy

error: Traceback (most recent call last): File "preprocess_embedding.py", line 76, in main() File "preprocess_embedding.py", line 49, in main word2embedding[line[0]] = np.asarray(map(float, line[1 : ])) ValueError: invalid literal for float(): 0

subhammahanta777 avatar Jun 29 '17 11:06 subhammahanta777

Can you try with python3?

payalbajaj avatar Aug 18 '17 20:08 payalbajaj

i have the same error, using python 2, do you have any tips to solve this error? thanks

talrose01 avatar Mar 14 '18 16:03 talrose01

whats the format for the text file which needs to be replaced in the paragraph/preprocess_embedding.sh file ??

Can i use this file ? glove.840B.300d.txt

or is there a way to generate a embedding text file by my own ??

SundeepPidugu avatar Apr 12 '19 06:04 SundeepPidugu