繁体   English   中英

如何将基于 tensorflow 构建的修改模型(用于迁移学习,in.ckpt 格式)导出到冻结图(.pb 文件)

[英]How to export a modified model(used for transfer learning, in .ckpt format) built on tensorflow to a frozen graph(.pb file)

我正在尝试从argman/EAST导出这个特定的 model 。 model 是单独制造的,重量在需要时加载到 session 中。 有没有办法可以将 model 从 session 导出到冻结图形 (.pb) 文件。 或者有没有其他方法可以做到这一点? Model 内置在model.py 文件(第 33 行)中,权重加载到 run_demo_server.py 中的model(第 54 行)

我见过一堆将“.ckpt”文件转换为“.pb”的脚本,但是,所有这些脚本都要求提供 output 节点名称,我无法找到 output 层名称。 任何帮助表示赞赏。

提前致谢。

在 google colab 中试试这个

!python export_inference_graph.py --input_type image_tensor --pipeline_config_path ssd_mobilenet_v2_quantized_300x300_coco.config --trained_checkpoint_prefix training/model.ckpt-xxxx --output_directory inference_graph

或者这个在 cmd

python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-XXXX --output_directory inference_graph

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM