CRIS.pytorch icon indicating copy to clipboard operation
CRIS.pytorch copied to clipboard

Evaluation code run error: ValueError: operands could not be broadcast together with shapes (480,640) (640,427)

Open WuHenry-0609 opened this issue 1 year ago • 1 comments

I trained a best_model.pth according to the instructions in github, but after entering the evaluation instructions, an error occurred: ValueError: operands could not be broadcast together with shapes (480,640) (640,427)

The error message is as follows: ''' 2023-11-09 22:21:31 | INFO | main:76 - => loading checkpoint 'exp/refcoco/CRIS_R50/best_model.pth' 2023-11-09 22:21:32 | INFO | main:79 - => loaded checkpoint 'exp/refcoco/CRIS_R50/best_model.pth' Inference:: 0%| | 0/3811 [00:02<?, ?it/s] 2023-11-09 22:21:35 | ERROR | main:90 - An error has been caught in function '', process 'MainProcess' (844605), thread 'MainThread' (139931839529792): Traceback (most recent call last):

File "test.py", line 90, in main() └ <function main at 0x7f4343b14e50>

File "test.py", line 86, in main inference(test_loader, model, args) │ │ │ └ CfgNode({'dataset': 'refcoco', 'train_lmdb': 'datasets/lmdb/refcoco/train.lmdb', 'train_split': 'train', 'val_lmdb': 'dataset... │ │ └ DataParallel( │ │ (module): CRIS( │ │ (backbone): CLIP( │ │ (visual): ModifiedResNet( │ │ (conv1): Conv2d(3, 32, kernel_s... │ └ <torch.utils.data.dataloader.DataLoader object at 0x7f4343ac32b0> └ <function inference at 0x7f4343b06e50>

File "/root/miniconda3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(*args, **kwargs) │ │ └ {} │ └ (<torch.utils.data.dataloader.DataLoader object at 0x7f4343ac32b0>, DataParallel( │ (module): CRIS( │ (backbone): CLIP( │ ... └ <function inference at 0x7f4343b06dc0>

File "/root/autodl-tmp/CRIS.pytorch/engine/engine.py", line 187, in inference inter = np.logical_and(pred, mask) │ │ │ └ array([[0., 0., 0., ..., 0., 0., 0.], │ │ │ [0., 0., 0., ..., 0., 0., 0.], │ │ │ [0., 0., 0., ..., 0., 0., 0.], │ │ │ ...,... │ │ └ array([[False, False, False, ..., False, False, False], │ │ [False, False, False, ..., False, False, False], │ │ [False... │ └ <ufunc 'logical_and'> └ <module 'numpy' from '/root/miniconda3/lib/python3.8/site-packages/numpy/init.py'>

ValueError: operands could not be broadcast together with shapes (480,640) (640,427) '''

WuHenry-0609 avatar Nov 09 '23 14:11 WuHenry-0609

Hi,have you solved this problem?

lcl-git-3d avatar Dec 25 '23 01:12 lcl-git-3d

Hello, I would like to know why the error AttributeError: module 'pyarrow' has no attribute 'deserialize' is reported, and what should be the correct version?

tubixiansheng avatar Sep 06 '24 03:09 tubixiansheng