garyzhao / SemGCN

The Pytorch implementation for "Semantic Graph Convolutional Networks for 3D Human Pose Regression" (CVPR 2019).
https://arxiv.org/abs/1904.03345
Apache License 2.0
465 stars 78 forks source link

While evaluating using pretrained models (https://github.com/garyzhao/SemGCN#evaluating-our-pretrained-models) #1

Closed v1093 closed 5 years ago

v1093 commented 5 years ago

for e.g., with SemGCN with non-local blocks

RuntimeError: Error(s) in loading state_dict for SemGCN:
    size mismatch for gconv_input.0.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.0.gconv1.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.0.gconv2.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.2.gconv1.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.2.gconv2.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.4.gconv1.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.4.gconv2.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.6.gconv1.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_layers.6.gconv2.gconv.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).
    size mismatch for gconv_output.e: copying a param with shape torch.Size([1, 46]) from checkpoint, the shape in current model is torch.Size([1, 49]).

Similar issues with other models.

garyzhao commented 5 years ago

@v1093 Thanks for your feedback.

It seems that you did not use the most recent code to evaluate the pretrained models. Please try the following steps.

  1. Delete all *.npz files in "data".
  2. Run "git pull" or download the newest version of our code.
  3. Follow "data/README.md" to re-generate ground truth data and 2D detections.
  4. Evaluate the pretrained models again.

Please let me know if it still does not work.

Best, Long

v1093 commented 5 years ago

Oops, I missed your last changes. It works now. Thanks for the quick response. :+1: