Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reshape Error while running Inference #60

Closed
saisubramani opened this issue Feb 13, 2020 · 2 comments
Closed

Reshape Error while running Inference #60

saisubramani opened this issue Feb 13, 2020 · 2 comments

Comments

@saisubramani
Copy link

Hi , i followed your code and i tried to covert for my model all went good. i used my .cfg file and .weights file, it given all .onnx and .trt file. But the thing is what i cant able to run inference its showing cant be reshape i dont know why? I changed the categories =19 as my number of classes in utils/yolov3.py file

trt_outputs = [output.reshape(shape) for output, shape Value-error: cannot reshape array of size 12168 into shape (1,255,13,13)

please give a detail explanation about the error.

@jkjung-avt
Copy link
Owner

Please refer to this: #51

@saisubramani
Copy link
Author

@jkjung-avt thanks i had founded the issue
hi i founded the error ! the error was we want to change the output shapes which was given in
self.output_shapes = [(batch_size, 18, 13, 13), (batch_size, 18, 26, 26)]
to
self.output_shapes = [(batch_size, 72, 13, 13), (batch_size, 72, 26, 26)]
where 72 is the filter size which we used during training the last layer.
num_of_calsses = 19
(num_of_classes +5)*3=72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants