Skip to content

fix slim exported lenet graph can not be frozen#5955

Open
zhangxg wants to merge 2 commits intotensorflow:masterfrom
zhangxg:master
Open

fix slim exported lenet graph can not be frozen#5955
zhangxg wants to merge 2 commits intotensorflow:masterfrom
zhangxg:master

Conversation

@zhangxg
Copy link

@zhangxg zhangxg commented Dec 25, 2018

the exported Lenet graph cannot be frozen due to below error:

InvalidArgumentError (see above for traceback): 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:

Assign requires shapes of both tensors to match. lhs shape= [5,5,3,32] rhs shape= [5,5,1,32]

The used scripts as following:
export graph

python export_inference_graph.py \
  --alsologtostderr \
  --model_name=lenet \
  --output_file=/tmp/lenet-model/lenet.pb \
  --dataset_name=mnist

frozen graph

python -m tensorflow.python.tools.freeze_graph \
  --input_graph=/tmp/lenet-model/lenet.pb \
  --input_checkpoint=/tmp/lenet-model/model.ckpt-600 \
  --input_binary=true \
  --output_graph=/tmp/lenet-model/lenet_freeze.pb \
  --output_node_names=Predictions/Reshape_1

@zhangxg zhangxg requested a review from sguada as a code owner December 25, 2018 03:26
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@zhangxg
Copy link
Author

zhangxg commented Dec 25, 2018

signed cla

@googlebot
Copy link

CLAs look good, thanks!

@jaeyounkim jaeyounkim added the stat:awaiting review Waiting on review label Apr 25, 2020
@laxmareddyp laxmareddyp added the models:research models that come under research directory label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes models:research models that come under research directory stat:awaiting review Waiting on review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants