nywang16 / Pixel2Mesh

Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images. In ECCV2018.
http://openaccess.thecvf.com/content_ECCV_2018/papers/Nanyang_Wang_Pixel2Mesh_Generating_3D_ECCV_2018_paper.pdf
Apache License 2.0
1.64k stars 294 forks source link

problem when restoring the checkpoints #75

Open hzhao1997 opened 4 years ago

hzhao1997 commented 4 years ago
 After unziping the checkpoints, I ran the demo and ran into some trouble:

 tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

2 root error(s) found.

(0) Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [256] rhs shape= [192] [[node save/Assign_39 (defined at tmp/pycharm_project_11/Pixel2Mesh-master/p2m/api.py:105) ]] [[save/RestoreV2/_106]] (1) Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [256] rhs shape= [192][[node save/Assign_39 (defined at tmp/pycharm_project_11/Pixel2Mesh-master/p2m/api.py:105) ]]

it looks like the difference of shape between model and checkpoint, but how can i fix it and could you give me a hand? thank you!

markuspaschi commented 4 years ago

Not quite sure if this helps.

Run: grep -rnw "192" ./* in your Pixel2Mesh directory. In the original eval_testset.py the hidden layers are set to 192, which should be 256. Try changing that value (and any other files containing 192 hidden layers):

flags.DEFINE_integer('hidden', 192, 'Number of units in hidden layer.') # gcn hidden layer channel to:

flags.DEFINE_integer('hidden', 256, 'Number of units in hidden layer.') # gcn hidden layer channel