{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18877","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18877/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18877/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18877/events","html_url":"https://github.com/tensorflow/tensorflow/issues/18877","id":317815863,"node_id":"MDU6SXNzdWUzMTc4MTU4NjM=","number":18877,"title":"Cannot use freeze_graph.py and optimize_for_inference.py with any model ","user":{"login":"Swordancer","id":14117671,"node_id":"MDQ6VXNlcjE0MTE3Njcx","avatar_url":"https://avatars3.githubusercontent.com/u/14117671?v=4","gravatar_id":"","url":"https://api.github.com/users/Swordancer","html_url":"https://github.com/Swordancer","followers_url":"https://api.github.com/users/Swordancer/followers","following_url":"https://api.github.com/users/Swordancer/following{/other_user}","gists_url":"https://api.github.com/users/Swordancer/gists{/gist_id}","starred_url":"https://api.github.com/users/Swordancer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swordancer/subscriptions","organizations_url":"https://api.github.com/users/Swordancer/orgs","repos_url":"https://api.github.com/users/Swordancer/repos","events_url":"https://api.github.com/users/Swordancer/events{/privacy}","received_events_url":"https://api.github.com/users/Swordancer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"petewarden","id":161459,"node_id":"MDQ6VXNlcjE2MTQ1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/161459?v=4","gravatar_id":"","url":"https://api.github.com/users/petewarden","html_url":"https://github.com/petewarden","followers_url":"https://api.github.com/users/petewarden/followers","following_url":"https://api.github.com/users/petewarden/following{/other_user}","gists_url":"https://api.github.com/users/petewarden/gists{/gist_id}","starred_url":"https://api.github.com/users/petewarden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petewarden/subscriptions","organizations_url":"https://api.github.com/users/petewarden/orgs","repos_url":"https://api.github.com/users/petewarden/repos","events_url":"https://api.github.com/users/petewarden/events{/privacy}","received_events_url":"https://api.github.com/users/petewarden/received_events","type":"User","site_admin":false},"assignees":[{"login":"petewarden","id":161459,"node_id":"MDQ6VXNlcjE2MTQ1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/161459?v=4","gravatar_id":"","url":"https://api.github.com/users/petewarden","html_url":"https://github.com/petewarden","followers_url":"https://api.github.com/users/petewarden/followers","following_url":"https://api.github.com/users/petewarden/following{/other_user}","gists_url":"https://api.github.com/users/petewarden/gists{/gist_id}","starred_url":"https://api.github.com/users/petewarden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petewarden/subscriptions","organizations_url":"https://api.github.com/users/petewarden/orgs","repos_url":"https://api.github.com/users/petewarden/repos","events_url":"https://api.github.com/users/petewarden/events{/privacy}","received_events_url":"https://api.github.com/users/petewarden/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-04-25T22:28:14Z","updated_at":"2018-09-03T18:37:41Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: N/A\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Windows 10 x64\r\n- **TensorFlow installed from (source or binary):**: PIP Python 3.6\r\n- **TensorFlow version (use command below)**: 1.7.0\r\n- **Python version**: 3.6\r\n- **Bazel version (if compiling from source)**: N/A\r\n- **GCC/Compiler version (if compiling from source)**: N/A\r\n- **CUDA/cuDNN version**: .9.0\r\n- **GPU model and memory**: 2GB\r\n- **Exact command to reproduce**:\r\n\r\n> py -m tensorflow.python.tools.freeze_graph --input_graph=output_graph.pb --input_checkpoint=C:/tmp/_retrain_checkpoint --output_graph=/tmp/frozen_graph.pb --output_node_names=final_result --input_binary=true\r\n\r\n> py \"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\Lib\\site-packages\\tensorflow\\python\\tools\\optimize_for_inference.py\" --input=output_graph.pb --output=/tmp/optimazed_frozen_graph.pb --frozen_graph=true --input_names=\"Placeholder\" --output_names \"final_result\" --inference_type=float\r\n\r\n### Describe the problem\r\n\r\nI have generated model with this tutorial for my own classes: https://www.tensorflow.org/tutorials/image_retraining\r\n\r\nI cannot use generated .pb file with EmguCV or OpenCV, becouse of import error, it looks like some layers are unsupported,  so I was trying to run these scripts first:\r\n\r\nfreeze_graph.py\r\n\r\n> py C:\\tensorflow-master\\tensorflow\\python\\tools\\freeze_graph.py --input_graph=output_graph.pb --input_checkpoint=C:/tmp/_retrain_checkpoint --output_graph=/tmp/frozen_graph.pb --output_node_names=softmax --input_binary=true\r\n\r\nI have an error:\r\n\r\nNames_to_saveables must be a dict mapping string names to Tensors/Variables. Not a variable: Tensor(\"final_retrain_ops/biases/final_biases:0\", shape=(6,), dtype=float32)\r\n\r\nThen optimize_for_inference.py \r\n\r\nMultiple errors \r\n\r\n> WARNING:tensorflow:Didn't find expected Conv2D input to 'module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm'\r\n\r\nScripts doesn't work with any generated .pb file, even some I've downloaded from the Internet\r\n\r\nIt looks like im doing something wrong or these scripts doesn't work with model from tutorial. I there any solution for that?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/418175024","html_url":"https://github.com/tensorflow/tensorflow/issues/18877#issuecomment-418175024","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/18877","id":418175024,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODE3NTAyNA==","user":{"login":"tensorflowbutler","id":28546240,"node_id":"MDQ6VXNlcjI4NTQ2MjQw","avatar_url":"https://avatars2.githubusercontent.com/u/28546240?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflowbutler","html_url":"https://github.com/tensorflowbutler","followers_url":"https://api.github.com/users/tensorflowbutler/followers","following_url":"https://api.github.com/users/tensorflowbutler/following{/other_user}","gists_url":"https://api.github.com/users/tensorflowbutler/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflowbutler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflowbutler/subscriptions","organizations_url":"https://api.github.com/users/tensorflowbutler/orgs","repos_url":"https://api.github.com/users/tensorflowbutler/repos","events_url":"https://api.github.com/users/tensorflowbutler/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflowbutler/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T18:37:41Z","updated_at":"2018-09-03T18:37:41Z","author_association":"MEMBER","body":"Nagging Assignee @petewarden: It has been 74 days with no activity and this issue has an assignee. Please update the label and/or status accordingly."}}
{"actor":{"display_login":"tensorflowbutler"}}