Yolov3: Error while changing image size

Created on 4 Mar 2020  路  3Comments  路  Source: ultralytics/yolov3

Hello. I'm trying to train models with my dataset.
When I tried training a model with default image size(416), the model trained normally.
But as I changed image size (set --img-size argument to my target image size e.g. 600), the system said 'RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 37 and 76 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71'

Should I change my cfg file? or Anything I missed??
I'm using the copy version of cfg/yolov3.cfg(changed filters and classes values)

Thanks.

Most helpful comment

@JungminChung img-sizes must be multiples of 32.

All 3 comments

@JungminChung img-sizes must be multiples of 32.

@glenn-jocher Thanks it works fine :)

Great! I'll close this issue for now as the original issue appears to have been resolved, and/or no activity has been seen for some time. Feel free to comment if this is not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arunavameister picture Arunavameister  路  3Comments

Aria20155 picture Aria20155  路  3Comments

Deep-Learner picture Deep-Learner  路  5Comments

mehrdadazizi72 picture mehrdadazizi72  路  3Comments

leeyunhome picture leeyunhome  路  3Comments