natanielruiz / deep-head-pose

:fire::fire: Deep Learning Head Pose Estimation using PyTorch.
Other
1.57k stars 367 forks source link

Output size is too small #91

Open marisancans opened 4 years ago

marisancans commented 4 years ago

Hello, I have 2 computers, and on first computer cpu only i'm using 128x128 image and everything works. On the second computer with cuda, I get error that calculated output is too small, the error is in here

It might be that possibly using different numpy versions and due to that, flooring of ceiling functions might differ, I have exactly the same code running on both computers.

The way I fixed it is by replacing self.avgpool = nn.AvgPool2d(7) with nn.AdaptiveAvgPool2d(1) This in my opinion is more dynamic to image sizes, after changes, it worked the same and I didn't see any major differences. Thanks

natanielruiz commented 4 years ago

Cool thanks