【发布时间】:2019-11-08 00:51:07
【问题描述】:
我是深度学习的新手,我想使用预训练 (EAST) 模型从 AI Platform Serving 提供服务,开发人员提供了这些文件:
- model.ckpt-49491.data-00000-of-00001
- 检查点
- model.ckpt-49491.index
- model.ckpt-49491.meta
我想将其转换为 TensorFlow .pb 格式。有没有办法做到这一点?我从here获取模型
完整代码可在here获取。
我查了here,它显示了以下代码来转换它:
来自tensorflow/models/research/
INPUT_TYPE=image_tensor
PIPELINE_CONFIG_PATH={path to pipeline config file}
TRAINED_CKPT_PREFIX={path to model.ckpt}
EXPORT_DIR={path to folder that will be used for export}
python object_detection/export_inference_graph.py \
--input_type=${INPUT_TYPE} \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--trained_checkpoint_prefix=${TRAINED_CKPT_PREFIX} \
--output_directory=${EXPORT_DIR}
我无法弄清楚要传递什么值:
- INPUT_TYPE
- PIPELINE_CONFIG_PATH。
【问题讨论】:
-
您需要SavedModel格式,请务必先转换成该格式,然后才能使用saved_model_cli工具分析您的模型
-
您能否详细说明一下。我该怎么做。或者建议我阅读一些材料。
标签: python-3.x tensorflow google-cloud-platform google-cloud-ml