tianyu0207 / RTFM

Official code for 'Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning' [ICCV 2021]
326 stars 78 forks source link

ValueError: cannot reshape array of size 117848348 into shape (6750,10,2048) #80

Open rabaig opened 2 years ago

rabaig commented 2 years ago

Hello,

Really appreciate your work.. I started using this repo. I made a setup and started python main.py.

I ran into error regarding shapes

Could you please help me on that.

fc1.weight fc1.bias fc2.weight fc2.bias fc3.weight fc3.bias Traceback (most recent call last): File "main.py", line 46, in auc = test(test_loader, model, args, viz, device) File "/media/jungyoonkim/D/RTFM-main/test_10crop.py", line 11, in test for i, input in enumerate(dataloader): File "/home/jungyoonkim/anaconda3/envs/wsal/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 346, in next data = self.dataset_fetcher.fetch(index) # may raise StopIteration File "/home/jungyoonkim/anaconda3/envs/wsal/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/jungyoonkim/anaconda3/envs/wsal/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/jungyoonkim/D/RTFM-main/dataset.py", line 58, in getitem features = np.load(self.list[index].strip('\n'), allow_pickle=True) File "/home/jungyoonkim/anaconda3/envs/wsal/lib/python3.7/site-packages/numpy/lib/npyio.py", line 441, in load pickle_kwargs=pickle_kwargs) File "/home/jungyoonkim/anaconda3/envs/wsal/lib/python3.7/site-packages/numpy/lib/format.py", line 787, in read_array array.shape = shape ValueError: cannot reshape array of size 117848348 into shape (6750,10,2048)

Thanks