Pixel2Mesh
Pixel2Mesh copied to clipboard
problem when restoring the checkpoints
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!
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