小编Shi*_*ahu的帖子

如何将 .ckpt 转换为 .pb?

我是深度学习的新手,我想使用预训练 (EAST) 模型从 AI Platform Serving 提供服务,开发人员提供了以下文件:

  1. model.ckpt-49491.data-00000-of-00001
  2. 检查站
  3. model.ckpt-49491.index
  4. model.ckpt-49491.meta

我想把它转换成 TensorFlow.pb格式。有没有办法做到这一点?我从这里拿了模型

完整代码可在此处获得

我查了一下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}
Run Code Online (Sandbox Code Playgroud)

我无法弄清楚要传递什么值:

  • 输入类型
  • PIPELINE_CONFIG_PATH。

python-3.x google-cloud-platform tensorflow google-cloud-ml

12
推荐指数
1
解决办法
1万
查看次数