{"id":15961273,"url":"https://github.com/cuuupid/tensorflow-export-utils","last_synced_at":"2025-03-26T12:32:13.376Z","repository":{"id":80644499,"uuid":"114414997","full_name":"cuuupid/tensorflow-export-utils","owner":"cuuupid","description":"Python Utils for exporting, freezing, and pbtxt generation with Tensorflow. (No Bazel)","archived":false,"fork":false,"pushed_at":"2018-03-04T03:14:59.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T19:44:31.576Z","etag":null,"topics":["bazel","freezing","graph","pbtxt","pretrained-checkpoints","tensorflow","utility"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuuupid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-15T22:06:40.000Z","updated_at":"2023-05-25T03:39:55.000Z","dependencies_parsed_at":"2023-03-12T11:40:03.230Z","dependency_job_id":null,"html_url":"https://github.com/cuuupid/tensorflow-export-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuuupid%2Ftensorflow-export-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuuupid%2Ftensorflow-export-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuuupid%2Ftensorflow-export-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuuupid%2Ftensorflow-export-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuuupid","download_url":"https://codeload.github.com/cuuupid/tensorflow-export-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245654368,"owners_count":20650853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","freezing","graph","pbtxt","pretrained-checkpoints","tensorflow","utility"],"created_at":"2024-10-07T15:41:23.210Z","updated_at":"2025-03-26T12:32:13.032Z","avatar_url":"https://github.com/cuuupid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Freezing Models\r\n\r\n## Preparation\r\n\r\nDownload the checkpoint files to `ckpt` folder here. (Use the MobilenetV1 224 pretrained checkpoint from [here](https://github.com/tensorflow/models/tree/master/research/slim#Pretrained))\r\n\r\nExport the inference graph:\r\n``` bash\r\npython export_inference_graph.py \\\r\n    --alsologtostderr --model_name=mobilenet_v1 \\\r\n    --image_size=224 --output_file=mobilenet.pb\r\n```\r\n\r\nFreeze the graph:\r\n``` bash\r\npython freeze_graph.py --input_graph=mobilenet.pb \\\r\n                       --input_checkpoint=ckpt/mobilenet_v1_1.0_224.ckpt \\\r\n                       --output_graph=mobilenet_f.pb --input_binary=true \\\r\n                       --output_node_names=MobilenetV1/Predictions/Reshape_1\r\n```\r\n\r\nEdit `pb_to_pbtxt.py` to use the name of your PB file as graph.\r\nMake pbtxt:\r\n``` bash\r\npython pb_to_pbtxt.py\r\n```\r\n\r\n## Serving\r\n\r\nSee `api.py` for example. Change input and output tensor names accordingly.\r\n\r\n## Credits\r\n\r\nGot the export and freezing scripts from tensorflow. Basically moving the utilities out of the repo to allow them to be used without bazel.\r\n\r\nModels from tensorflow/models repo.\r\n\r\nDatasets, pretrained checkpoints, etc. from tensorflow/models/research/slim.\r\n\r\n**Working as of 3/4/2018.**\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuuupid%2Ftensorflow-export-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuuupid%2Ftensorflow-export-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuuupid%2Ftensorflow-export-utils/lists"}