KunpengLi1994 / VSRN

PyTorch code for ICCV'19 paper "Visual Semantic Reasoning for Image-Text Matching"
288 stars 47 forks source link

A question about training :ValueError: cannot reshape array of size 4571246560 into shape (113287,36,2048) #8

Closed lawRen75 closed 4 years ago

lawRen75 commented 4 years ago

when i run train.py ,i meet an error like this : Traceback (most recent call last): File "train.py", line 312, in main() File "train.py", line 133, in main opt.data_name, vocab, opt.crop_size, opt.batch_size, opt.workers, opt) File "/home/sdb1/VSRN-master/data.py", line 376, in get_loaders batch_size, True, workers) File "/home/sdb1/VSRN-master/data.py", line 342, in get_precomp_loader dset = PrecompDataset(data_path, data_split, vocab, opt) File "/home/sdb1/VSRN-master/data.py", line 217, in init self.images = np.load(loc+'%s_ims.npy' % data_split) File "/root/miniconda3/envs/py27/lib/python2.7/site-packages/numpy/lib/npyio.py", line 419, in load pickle_kwargs=pickle_kwargs) File "/root/miniconda3/envs/py27/lib/python2.7/site-packages/numpy/lib/format.py", line 681, in read_array array.shape = shape ValueError: cannot reshape array of size 4571246560 into shape (113287,36,2048)

I have been troubled by this problem for a long time. I will be grateful if you can help me solve this problem.

KunpengLi1994 commented 4 years ago

I'm not sure... I have not met such errors before. Have your checked the numpy version? We are using numpy 1.15.2 Also check other packages in requirement.txt.

lawRen75 commented 4 years ago

I'm not sure... I have not met such errors before. Have your checked the numpy version? We are using numpy 1.15.2 Also check other packages in requirement.txt.

Thank you for your answer! I will try to solve it with your method.

shuihuayi commented 4 years ago

I have also met this question how do you solve it , I use numpy==1.15.2 ,but thia question also appear.