shape '[64, 32, 3, 3]' is invalid for input of size 1020

Hi ,

I need your help
this is my output when i run this

wwwdata@serveur:~/downloads/libtorch-yolov3$ ./yolo-app ../imgs/person.jpg

output :

terminate called after throwing an instance of ‘std::runtime_error’
what(): shape ‘[64, 32, 3, 3]’ is invalid for input of size 1020
Aborted (core dumped)

this is my environment:

wwwdata@serveur:~/downloads/libtorch-yolov3$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

wwwdata@serveur:~/downloads/libtorch-yolov3$ hostnamectl
Static hostname: serveur
Icon name: computer-vm
Chassis: vm
Machine ID: dd0762ee40c5444682b0807ec155ec6f
Boot ID: 7bcfc3a214134b92970d919c4f3a2757
Virtualization: oracle
Operating System: Ubuntu 22.04.5 LTS
Kernel: Linux 5.15.0-139-generic
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox

Regards

Somewhere in your code you are trying to reshape or view a tensor with an invalid shape:

x = torch.randn(1020)
x.view(64, 32, 3, 3)
# RuntimeError: shape '[64, 32, 3, 3]' is invalid for input of size 1020

and would need to narrow down the failing line of code.