【问题标题】:Failed to convert Tensorflow .pd to json未能将 Tensorflow .pd 转换为 json
【发布时间】:2019-09-17 12:09:30
【问题描述】:

尝试将保存的模型转换为 json 用于 tensorflow js。借鉴https://github.com/tensorflow/tfjs/tree/master/tfjs-converter的例子

版本: 张量流js 1.2.9

依赖版本: keras 2.2.4-tf 张量流 1.14.0

运行这个 cmd:

tensorflowjs_converter --input_format=tf_saved_model --output_format=tfjs_graph_model --signature_name=serving_default --saved_model_tags=serve /saved_model  /web_model

运行代码时出现此错误消息:

F .\tensorflow/core/grappler/graph_view.h:332] Check failed: st.ok() Non unique node name detected: SecondStageFeatureExtractor/InceptionV2/Mixed_5c/Branch_2/Conv2d_0c_3x3/weights

【问题讨论】:

  • 您能描述一下 tfjs-converter 的版本和您尝试转换的模型名称吗?
  • 嗨 Kai Sasaki,这里是详细信息:tensorflowjs 1.2.9 依赖版本:keras 2.2.4-tf tensorflow 1.14.0 我要转换的模型是更快的 rcnn inception v2 coco。

标签: tensorflow.js tensorflowjs-converter


【解决方案1】:

您可以尝试最新的转换器版本 1.3.1.1 我相信这个问题已经解决了。 https://github.com/tensorflow/tfjs/issues/2055

【讨论】:

  • 我确实更改到最新版本,但仍然面临同样的问题
【解决方案2】:

该转换器似乎仅适用于 Google Colab,没有任何问题。感谢大家的意见。

【讨论】:

    猜你喜欢
    • 2021-12-28
    • 1970-01-01
    • 2019-08-01
    • 2021-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-28
    • 2021-02-06
    相关资源
    最近更新 更多