pytorch-yolo-v3 icon indicating copy to clipboard operation
pytorch-yolo-v3 copied to clipboard

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 86 and 8 in dimension 1 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71

Open Andrew05200 opened this issue 5 years ago • 9 comments

Andrew05200 avatar Jul 12 '19 08:07 Andrew05200

Hi, i meet the same error, have you solved it? Thanks.

Holmeyoung avatar Jul 30 '19 12:07 Holmeyoung

Hi, i meet the same error, have you solved it? Thanks.

i meet the same error too, have you solved it? Thanks.

xiran2018 avatar Sep 09 '19 09:09 xiran2018

At line 147 of util. py, insert

if image_pred_.shape[0] == 0: output=0 continue

errollxj avatar Sep 17 '19 06:09 errollxj

At line 147 of util. py, insert

if image_pred_.shape[0] == 0: output=0 continue

@errollxj it will work ah?

Naveennavik avatar Dec 12 '19 11:12 Naveennavik

At line 147 of util. py, insert

if image_pred_.shape[0] == 0: output=0 continue

@errollxj is this working because we dont use that util.py in training code sir?

Naveennavik avatar Dec 13 '19 05:12 Naveennavik

At line 147 of util. py, insert

if image_pred_.shape[0] == 0: output=0 continue

I got help, my code have woked. thank you

Samuel-wei avatar May 28 '20 02:05 Samuel-wei

after insert if image_pred_.shape[0] == 0: output=0 continue

image have anybody meet and solved?

hahahao-lh avatar Feb 14 '21 08:02 hahahao-lh

have anybody meet and solved?

same to you,

bingxindu avatar Mar 28 '21 05:03 bingxindu

At line 147 of util. py, insert

if image_pred_.shape[0] == 0: output=0 continue

solved, the result : Loading network..... Network successfully loaded person.jpg predicted in 0.104 seconds Objects Detected: person dog horse

giraffe.jpg predicted in 0.152 seconds Objects Detected: zebra giraffe giraffe

img1.jpg predicted in 0.110 seconds Objects Detected: person dog

dog.jpg predicted in 0.098 seconds Objects Detected: bicycle truck dog

messi.jpg predicted in 0.158 seconds Objects Detected: person person person sports ball

img4.jpg predicted in 0.093 seconds Objects Detected: chair chair chair clock

eagle.jpg predicted in 0.069 seconds Objects Detected: bird

img3.jpg predicted in 0.241 seconds Objects Detected: car car car car car car car truck traffic light

herd_of_horses.jpg predicted in 0.087 seconds Objects Detected: horse horse horse horse

img2.jpg predicted in 0.068 seconds Objects Detected: train

SUMMARY

Task : Time Taken (in seconds)

Reading addresses : 0.000 Loading batch : 0.228 Detection (11 images) : 2.113 Output Processing : 0.000 Drawing Boxes : 0.454 Average time_per_img : 0.254

Ontheroad123 avatar Jul 02 '21 07:07 Ontheroad123