ilovepose / DarkPose

Distribution-Aware Coordinate Representation for Human Pose Estimation
https://ilovepose.github.io/coco
Apache License 2.0
550 stars 80 forks source link

Tensor size mismatch when training takes hourglass as back-bone #21

Closed YxZhxn closed 3 years ago

YxZhxn commented 3 years ago

When I tried to train the hourglass network with image's input size of 128 x 96, the code threw an error about tensor size mismatch in this line: https://github.com/ilovepose/DarkPose/blob/612fad594eddd022b8a162a2c7274f9ee8d06d2c/lib/models/hourglass.py#L91 the shape of the parameter up1 and up2 are torch.Size([4, 256, 4, 3]) and torch.Size([4, 256, 4, 2]). Does it has anything to do with the pytorch version or max-pooling layer?

YxZhxn commented 3 years ago

Nevermind, set depth equals to 3 will solve the problem. https://github.com/ilovepose/DarkPose/blob/612fad594eddd022b8a162a2c7274f9ee8d06d2c/lib/models/hourglass.py#L61