SiamMask icon indicating copy to clipboard operation
SiamMask copied to clipboard

RuntimeError: invalid argument 2: size '[127 x 127]' is invalid for input with 3969 elements at /pytorch/aten/src/TH/THStorage.cpp:84

Open ncutgit opened this issue 6 years ago • 2 comments

ncutgit avatar Apr 26 '19 09:04 ncutgit

do you solve this problem?

PanAndy avatar Apr 11 '20 02:04 PanAndy

i met this error when run the demo.py with "refine_enable=False" in siamese_track(...) . the error occurred at: mask = mask[0, :, delta_y, delta_x].sigmoid(). \ squeeze().view(p.out_size, p.out_size).cpu().data.numpy() i changed it to mask = mask[0, :, delta_y, delta_x].sigmoid().view(1, 1, p.out_size // 2, p.out_size // 2) mask = torch.nn.UpsamplingBilinear2d(size=[p.out_size, p.out_size])(mask) mask = mask.view(p.out_size, p.out_size).squeeze().cpu().data.numpy() the reason may be the predicted mask is 1x(63x63)x25x25, the selected one is (63x63). it can't be viewed as (127x127)

PanAndy avatar Apr 11 '20 03:04 PanAndy