tweet2vec icon indicating copy to clipboard operation
tweet2vec copied to clipboard

Value Error while loading 'best_model.npz'

Open sftekin opened this issue 6 years ago • 3 comments

Hello, I was trying to run the code but I came across with an error saying, "ValueError: EOF: reading array data, expected 262144 bytes got 21990" while loading 'best_model.npz' in 'load_params' method. What could be the reason? Thanks...

sftekin avatar Dec 09 '18 17:12 sftekin

I have the same problem. So how to solve it??

chao276951044 avatar Feb 27 '19 00:02 chao276951044

I think this has something to do with File mode, I have modified load_params function in t2v.py module by changing line 103: with open(path,'r') as f to with open(path,'rb') as f (open the file in binary mode) and it worked.

Ragsh avatar May 12 '19 04:05 Ragsh

delete the line: with open(path, 'r', encoding="ISO-8859-1") as f: and then pass the path parameter to np.load directly: npzfile = np.load(path)

bilalghanem avatar Jul 15 '19 10:07 bilalghanem