完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我试图为我的tensorflow保存的模型运行模型优化器,但失败了。 以下是我保存的模型。 (基数)D: tmp export 1536028618> saved_model_cli show --dir。 --tag_set serve --signature_def serving_default c: programdata anaconda3 lib site-packages h5py __ init__.py:34:FutureWarning:不推荐将issubdtype的第二个参数从`float`转换为`np.floating`。 将来,它将被视为`np.float64 == np.dtype(float).type`。 从._conv导入register_converters作为_register_converters 给定的SavedModel SignatureDef包含以下输入: 输入['image'] tensor_info: dtype:DT_FLOAT 形状:(-1,28,28) name:占位符:0 给定的SavedModel SignatureDef包含以下输出: 输出['classes'] tensor_info: dtype:DT_INT64 形状:( - 1) 名称:ArgMax:0 输出['概率'] tensor_info: dtype:DT_FLOAT 形状:(-1,10) 名称:Softmax:0 方法名称是:tensorflow / serving / predict 以下是我从模型优化器得到的失败消息。 (基础)C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer> python mo_tf.py --saved_model_dir D: tmp export 1536028618 --input_shape [1,28,28] 模型优化器参数: 常用参数: - 输入模型的路径:无 - 生成IR的路径:C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer 。 - IR输出名称:saved_model - 日志级别:错误 - 批处理:未指定,继承自模型 - 输入图层:未指定,从模型继承 - 输出图层:未指定,从模型继承 - 输入形状:[1,28,28] - 平均值:未指定 - 比例值:未指定 - 比例因子:未指定 - IR精度:FP32 - 启用融合:True - 启用分组卷积融合:真 - 将平均值移动到预处理部分:False - 反向输入通道:错误 TensorFlow特定参数: - 文本protobuf格式的输入模型:False - 卸载不支持的操作:False - TensorBoard模型转储的路径:无 - 使用输入/输出节点名称更新配置文件:无 - 使用用于使用对象检测API生成模型的配置文件:无 - 卸载操作:无 - 卸载模式:无 - 使用配置文件:无 型号优化器版本:1.2.185.5335e231 C: ProgramData Anaconda3 lib site-packages h5py __ init__.py:34:FutureWarning:不推荐将issubdtype的第二个参数从`float`转换为`np.floating`。 将来,它将被视为`np.float64 == np.dtype(float).type`。 从._conv导入register_converters作为_register_converters [错误]模型中没有或多个占位符,但只提供了一个形状,无法设置它。 有关更多信息,请参阅Model Optimizer FAQ(/deloyment_tools/documentation/docs/MO_FAQ.html),问题#32。 我检查了文件MO_FAQ.htm,但我找不到足够的信息来解决问题。 有人可以给我一些指导吗? 谢谢, 插口 以上来自于谷歌翻译 以下为原文 Hi, I tried to run model optimizer for my tensorflow saved model, but failed. Following is my saved model. (base) D:tmpexport1536028618>saved_model_cli show --dir . --tag_set serve --signature_def serving_default c:programdataanaconda3libsite-packagesh5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters The given SavedModel SignatureDef contains the following input(s): inputs['image'] tensor_info: dtype: DT_FLOAT shape: (-1, 28, 28) name: Placeholder:0 The given SavedModel SignatureDef contains the following output(s): outputs['classes'] tensor_info: dtype: DT_INT64 shape: (-1) name: ArgMax:0 outputs['probabilities'] tensor_info: dtype: DT_FLOAT shape: (-1, 10) name: Softmax:0 Method name is: tensorflow/serving/predict And following is what I got failed message from model optimizer. (base) C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizer>python mo_tf.py --saved_model_dir D:tmpexport1536028618 --input_shape [1,28,28] Model Optimizer arguments: Common parameters: - Path to the Input Model: None - Path for generated IR: C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizer. - IR output name: saved_model - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Not specified, inherited from the model - Output layers: Not specified, inherited from the model - Input shapes: [1,28,28] - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: False - Reverse input channels: False TensorFlow specific parameters: - Input model in text protobuf format: False - Offload unsupported operations: False - Path to model dump for TensorBoard: None - Update the configuration file with input/output node names: None - Use configuration file used to generate the model with Object Detection API: None - Operations to offload: None - Patterns to offload: None - Use the config file: None Model Optimizer version: 1.2.185.5335e231 C:ProgramDataAnaconda3libsite-packagesh5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters [ ERROR ] No or multiple placeholders in the model, but only one shape is provided, cannot set it. For more information please refer to Model Optimizer FAQ ( I checked doc MO_FAQ.htm, but I can't find enough information to solve the problem. Can someone give me some guidance? Thanks, Jack |
|
相关推荐
19个回答
|
|
嗨杰克,谢谢你的问题。我们会检查并回复你。退休,安居
以上来自于谷歌翻译 以下为原文 Hi Jack, Thank you for the question. We will check and get back to you. Regards, Anju |
|
|
|
嗨杰克,错误意味着您在模型中没有或多个输入,但是您为占位符错误地提供了一个形状。请您确认用于查找模型详细信息的方法吗?您可以尝试以下建议和 回到我们的结果,以便我们可以进一步帮助您-1。 使用以下方法分析保存的占位符图形文件并相应地给出输入大小-inmport tensorflow作为tffrom tensorflow.python.platform导入gfilewith tf.Session()作为sess:with gfile.FastGFile(“path to your pb file”,' rb')as f:graph_def = tf.GraphDef()graph_def.ParseFromString(f.read())sess.graph.as_default()tf.import_graph_def(graph_def,name ='')writer = tf.summary.FileWriter(“ ./tf_summary“,graph = sess.graph)for sess.graph.get_operations():if op.type ==”Placeholder“:print(op)2。 要从最终分析它,我们需要模型文件。 如果1没有帮助,请分享从我们最终重新创建问题的步骤。 为此,您可以共享获取模型的步骤,或共享模型文件本身。谢谢& 问候, Astha 以上来自于谷歌翻译 以下为原文 Hi Jack, The error implies that you either have no or multiple inputs in the model but you have provided incorrectly only one shape for the placeholder. Could you please confirm the method you used to find the model details? You could try the following suggestions and get back to us with the results so that we can assist you further - 1. Analyze the saved graph file for placeholders using the following method and give input size accordingly - import tensorflow as tf from tensorflow.python.platform import gfile with tf.Session() as sess: with gfile.FastGFile("Path to your pb file",'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFromString(f.read()) sess.graph.as_default() tf.import_graph_def(graph_def, name='') writer = tf.summary.FileWriter("./tf_summary", graph=sess.graph) for op in sess.graph.get_operations(): if op.type == "Placeholder" : print(op) 2. To analyze it from our end, we would require the model files. If 1 doesn't help, please share the steps to recreate the issue from our end. For this you could share the steps to obtain the model, or share the model file itself. Thanks & Regards, Astha |
|
|
|
cd340823 发表于 2018-11-12 16:53 嗨杰克,请你确认提供的决议是否有帮助,以便我们可以关闭线程或进一步帮助你。谢谢& 问候,Astha 以上来自于谷歌翻译 以下为原文 Hi Jack, Could you please confirm if the resolution provided helped so that we can close the thread or further assist you. Thanks & Regards, Astha |
|
|
|
cd340823 发表于 2018-11-12 16:53 嗨,Astha 感谢您的答复。 我使用的模型来自以下github。 https://github.com/tensorflow/models/blob/master/official/mnist/mnist.py 基本上它应该只有一个占位符。 #导出模型 如果flags_obj.export_dir不是None: image = tf.placeholder(tf.float32,[None,28,28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image':图片, }) mnist_classifier.export_savedmodel(flags_obj.export_dir,input_fn) 我会说得更清楚,然后再回复你。 谢谢, 插口 以上来自于谷歌翻译 以下为原文 Hi, Astha Thanks for your response. The model I use is from following github. https://github.com/tensorflow/models/blob/master/official/mnist/mnist.py Basically it should have only one placeholder. # Export the model if flags_obj.export_dir is not None: image = tf.placeholder(tf.float32, [None, 28, 28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image': image, }) mnist_classifier.export_savedmodel(flags_obj.export_dir, input_fn) I'll make it more clear and get back to you. Thanks, Jack |
|
|
|
嗨杰克,谢谢您的确认。我们将尝试使用提供的模型复制您的问题。此外,等待您的回复以获取更多详细信息.Regards,Astha 以上来自于谷歌翻译 以下为原文 Hi Jack, Thank you for the confirmation. We will try to replicate your issue with the model provided. Also, waiting for your response for further details. Regards, Astha |
|
|
|
cd340823 发表于 2018-11-12 17:30 嗨,Astha 我使用了以下代码,并且能够拥有“占位符”节点。 导入张量流为tf 来自tensorflow.python.platform导入gfile 使用tf.Session()作为sess: tf.saved_model.loader.load(sess,[tf.saved_model.tag_constants.SERVING],“export \ 1536563059”) 对于sess.graph.get_operations()中的op: 如果op.type ==“占位符”: 打印(OP) OUTPUT: 名称:“占位符” op:“占位符” attr { 关键:“dtype” 价值{ 类型:DT_FLOAT } } attr { 关键:“形状” 价值{ 形状{ 昏暗{ 大小:-1 } 昏暗{ 大小:28 } 昏暗{ 大小:28 } } } } 名称:“reshape_input” op:“占位符” attr { 关键:“dtype” 价值{ 类型:DT_FLOAT } } attr { 关键:“形状” 价值{ 形状{ 昏暗{ 大小:-1 } 昏暗{ 大小:784 } } } } 识别出两个“占位符”节点。 所以我将名为“Placeholder”的那个指定为输入节点,并给出以下命令。 python mo_tf.py --saved_model_dir D: JKWorkQuantaII 2018_0831-ai_edge_server 2018_0906-convert_tensorflow_mnist_model models-master official mnist export 1536563059 --input_shape [1,28,28] - 输入“占位符” 然后我收到了以下消息。 (基础)C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer> python mo_tf.py --saved_model_dir D: JKWorkQuantaII 2018_0831-ai_edge_server 2018_0906-convert_tensorflow_mnist_model models-master official mnist export 1536563059 --input_shape [1,28,28] - 输入“占位符” 模型优化器参数: 常用参数: - 输入模型的路径:无 - 生成IR的路径:C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer 。 - IR输出名称:saved_model - 日志级别:错误 - 批处理:未指定,继承自模型 - 输入图层:占位符 - 输出图层:未指定,从模型继承 - 输入形状:[1,28,28] - 平均值:未指定 - 比例值:未指定 - 比例因子:未指定 - IR精度:FP32 - 启用融合:True - 启用分组卷积融合:真 - 将平均值移动到预处理部分:False - 反向输入通道:错误 TensorFlow特定参数: - 文本protobuf格式的输入模型:False - 卸载不支持的操作:False - TensorBoard模型转储的路径:无 - 使用输入/输出节点名称更新配置文件:无 - 使用用于使用对象检测API生成模型的配置文件:无 - 卸载操作:无 - 卸载模式:无 - 使用配置文件:无 型号优化器版本:1.2.185.5335e231 C: ProgramData Anaconda3 lib site-packages h5py __ init__.py:34:FutureWarning:不推荐将issubdtype的第二个参数从`float`转换为`np.floating`。 将来,它将被视为`np.float64 == np.dtype(float).type`。 从._conv导入register_converters作为_register_converters [错误] ----------------------------------------------- - [错误] -----------------内部错误---------------- [ERROR]发生意外异常。 [错误]请联系Model Optimizer开发人员并转发以下信息: [错误] [ERROR] Traceback(最近一次调用最后一次): 文件“C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo main.py”,第321行,主要 返回驱动程序(argv) 驱动程序中的文件“C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo main.py”,第263行 mean_scale_values = mean_scale) 文件“C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo pipeline tf.py”,第264行,在tf2nx中 convert_add_to_scaleshift(graph)#scale = 1 在convert_add_to_scaleshift中输入文件“C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo middle pass conv.py”,第361行 tensor_id,value_id = get_tensor_id(node),get_value_id(node) 在get_tensor_id中的文件“C: Intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo middle pass fusing helpers.py”,第28行 断言node.has_valid('op')和(node.op =='Mul'或node.op =='Add') Asse田 [ERROR] ---------------- BUG报告结束-------------- [错误] ----------------------------------------------- - 此外,我还将saved_model文件附加到附件中,以备您需要时使用。 谢谢, 插口 1536563059.rar 11.6 MB 以上来自于谷歌翻译 以下为原文 Hi, Astha I used following code and able to have "Placeholder" nodes. import tensorflow as tf from tensorflow.python.platform import gfile with tf.Session() as sess: tf.saved_model.loader.load(sess, [tf.saved_model.tag_constants.SERVING], "export\1536563059") for op in sess.graph.get_operations(): if op.type == "Placeholder" : print(op) OUTPUT: name: "Placeholder" op: "Placeholder" attr { key: "dtype" value { type: DT_FLOAT } } attr { key: "shape" value { shape { dim { size: -1 } dim { size: 28 } dim { size: 28 } } } } name: "reshape_input" op: "Placeholder" attr { key: "dtype" value { type: DT_FLOAT } } attr { key: "shape" value { shape { dim { size: -1 } dim { size: 784 } } } } Two "Placeholder" nodes are identified. So I assign the one named "Placeholder" as input node, and give following command. python mo_tf.py --saved_model_dir D:JKWorkQuantaII2018_0831-ai_edge_server2018_0906-convert_tensorflow_mnist_modelmodels-masterofficialmnistexport1536563059 --input_shape [1,28,28] --input "Placeholder" And then I got following messages. (base) C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizer>python mo_tf.py --saved_model_dir D:JKWorkQuantaII2018_0831-ai_edge_server2018_0906-convert_tensorflow_mnist_modelmodels-masterofficialmnistexport1536563059 --input_shape [1,28,28] --input "Placeholder" Model Optimizer arguments: Common parameters: - Path to the Input Model: None - Path for generated IR: C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizer. - IR output name: saved_model - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Placeholder - Output layers: Not specified, inherited from the model - Input shapes: [1,28,28] - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: False - Reverse input channels: False TensorFlow specific parameters: - Input model in text protobuf format: False - Offload unsupported operations: False - Path to model dump for TensorBoard: None - Update the configuration file with input/output node names: None - Use configuration file used to generate the model with Object Detection API: None - Operations to offload: None - Patterns to offload: None - Use the config file: None Model Optimizer version: 1.2.185.5335e231 C:ProgramDataAnaconda3libsite-packagesh5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters [ ERROR ] ------------------------------------------------- [ ERROR ] ----------------- INTERNAL ERROR ---------------- [ ERROR ] Unexpected exception happened. [ ERROR ] Please contact Model Optimizer developers and forward the following information: [ ERROR ] [ ERROR ] Traceback (most recent call last): File "C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomain.py", line 321, in main return driver(argv) File "C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomain.py", line 263, in driver mean_scale_values=mean_scale) File "C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermopipelinetf.py", line 264, in tf2nx convert_add_to_scaleshift(graph) # scale = 1 File "C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomiddlepassesconv.py", line 361, in convert_add_to_scaleshift tensor_id, value_id = get_tensor_id(node), get_value_id(node) File "C:Intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomiddlepassesfusinghelpers.py", line 28, in get_tensor_id assert node.has_valid('op') and (node.op == 'Mul' or node.op == 'Add') AssertionError [ ERROR ] ---------------- END OF BUG REPORT -------------- [ ERROR ] ------------------------------------------------- And also I attach the saved_model file in attachment, in case you may need it. Thanks, Jack
|
|
|
|
嗨杰克,我们正在尝试重建这里需要一两天的问题。 谢谢你的耐心。记住,多纳 以上来自于谷歌翻译 以下为原文 Hi Jack, We are trying to recreate the problem here which will take a day or two. Thank you for your patience. Regards, Dona |
|
|
|
谢谢,多纳。 -插口 以上来自于谷歌翻译 以下为原文 Thanks, Dona. -Jack |
|
|
|
嗨杰克,当我们试图重新创建问题时,我们又得到了一个错误:python C: computer_vision_sdk_2018.2.304 deployment_tools model_optimizer mo_tf.py --saved_model_dir C: Users xxxxxxx Downloads 1536563059 --input_shape [1, 28,28] - 输入“占位符”模型优化器参数:公共参数: - 输入模型的路径:无 - 生成的IR的路径:C: Users xxxxx 。 - IR输出名称:saved_model - 日志级别:错误 - 批处理:未指定,继承自模型 - 输入图层:占位符 - 输出图层:未指定,从模型继承 - 输入形状:[1,28,28] - 均值 值:未指定 - 比例值:未指定 - 比例因子:未指定 - IR的精度:FP32 - 启用定影:True - 启用分组卷积定影:True - 将平均值移动到预处理部分:False - 反向输入通道:FalseTensorFlow特定 参数: - 文本protobuf格式的输入模型:False - 卸载不支持的操作:False - TensorBoard的模型转储路径:无 - 使用输入/输出节点名称更新配置文件:无 - 卸载操作:无 - 要卸载的模式: 无 - 使用配置文件:NoneModel Optimizer版本:1.2.110.59f62983 [错误]无法加载输入模型:在SavedModel中找不到与标签''关联的MetaGraphDef。 要检查SavedModel中的可用标记集,请使用SavedModel CLI:`saved_model_cli`上面提到的错误似乎是个问题,因为与github链接中提到的模型相比,模型的使用方式不正确。 https://github.com/tensorflow/models/tree/master/official/mnist请与您分享使用的确切步骤.Regards,Dona 以上来自于谷歌翻译 以下为原文 Hi Jack, When we tried to recreate the issue, we got another error: python C:computer_vision_sdk_2018.2.304deployment_toolsmodel_optimizermo_tf.py --saved_model_dir C:UsersxxxxxxxDownloads1536563059 --input_shape [1,28,28] --input "Placeholder" Model Optimizer arguments: Common parameters: - Path to the Input Model: None - Path for generated IR: C:Usersxxxxx. - IR output name: saved_model - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Placeholder - Output layers: Not specified, inherited from the model - Input shapes: [1,28,28] - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: False - Reverse input channels: False TensorFlow specific parameters: - Input model in text protobuf format: False - Offload unsupported operations: False - Path to model dump for TensorBoard: None - Update the configuration file with input/output node names: None - Operations to offload: None - Patterns to offload: None - Use the config file: None Model Optimizer version: 1.2.110.59f62983 [ ERROR ] Cannot load input model: MetaGraphDef associated with tags '' could not be found in SavedModel. To inspect available tag-sets in the SavedModel, please use the SavedModel CLI: `saved_model_cli` The above mentioned error seems to be a problem since the model is used in an incorrect way to predict, compared to what is mentioned in the github link: https://github.com/tensorflow/models/tree/master/official/mnist Could you please share the exact steps used. Regards, Dona |
|
|
|
jerry1978 发表于 2018-11-12 18:36 嗨,多纳 步骤完全相同。 我可以知道您环境中文件夹1536563059的列表内容。 以下是我的步骤。 我试过tensorflow-1.9.0和tensrflow-1.10.0,它们都输出相同的错误信息。 我注意到我的openvino版本和你的不同。 这可能是原因吗? (基础)D: JKTemp> cd 1536563059 (基地)D: JKTemp 1536563059> dir 2018/09/13下午04:20 2018/09/13下午04:20 2018/09/10下午03:04 38,914 saved_model.pb 2018/09/13下午04:20变量 (基础)D: JKTemp 1536563059> python C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo_tf.py --saved_model_dir D: JKTemp 1536563059 --input_shape [1,28,28] --input“ 占位符” 模型优化器参数: 常用参数: - 输入模型的路径:无 - 生成IR的路径:D: JKTemp 1536563059 。 - IR输出名称:saved_model - 日志级别:错误 - 批处理:未指定,继承自模型 - 输入图层:占位符 - 输出图层:未指定,从模型继承 - 输入形状:[1,28,28] - 平均值:未指定 - 比例值:未指定 - 比例因子:未指定 - IR精度:FP32 - 启用融合:True - 启用分组卷积融合:真 - 将平均值移动到预处理部分:False - 反向输入通道:错误 TensorFlow特定参数: - 文本protobuf格式的输入模型:False - 卸载不支持的操作:False - TensorBoard模型转储的路径:无 - 使用输入/输出节点名称更新配置文件:无 - 使用用于使用对象检测API生成模型的配置文件:无 - 卸载操作:无 - 卸载模式:无 - 使用配置文件:无 型号优化器版本:1.2.185.5335e231 C: ProgramData Anaconda3 lib site-packages h5py __ init__.py:34:FutureWarning:不推荐将issubdtype的第二个参数从`float`转换为`np.floating`。 将来,它将被视为`np.float64 == np.dtype(float).type`。 从._conv导入register_converters作为_register_converters [错误] ----------------------------------------------- - [错误] -----------------内部错误---------------- [ERROR]发生意外异常。 [错误]请联系Model Optimizer开发人员并转发以下信息: [错误] [ERROR] Traceback(最近一次调用最后一次): 文件“C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo main.py”,第321行,主要 返回驱动程序(argv) 驱动程序中的文件“C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo main.py”,第263行 mean_scale_values = mean_scale) 文件“C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo pipeline tf.py”,第264行,在tf2nx中 convert_add_to_scaleshift(graph)#scale = 1 在convert_add_to_scaleshift中输入文件“C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo middle passing conv.py”,第361行 tensor_id,value_id = get_tensor_id(node),get_value_id(node) get_tensor_id中的文件“C: intel computer_vision_sdk_2018.3.343 deployment_tools model_optimizer mo middle pass fusing helpers.py”,第28行 断言node.has_valid('op')和(node.op =='Mul'或node.op =='Add') Asse田 [ERROR] ---------------- BUG报告结束-------------- [错误] ----------------------------------------------- - 谢谢, 插口 以上来自于谷歌翻译 以下为原文 Hi, Dona The steps is exactly the same. May I know what's list contents of folder 1536563059 in your environment. Followings are my steps. I'd tried tensorflow-1.9.0 and tensrflow-1.10.0, both of them output the same error message. And I noticed that the my openvino version is different as yours. Is that could be the cause? (base) D:JKTemp>cd 1536563059 (base) D:JKTemp1536563059>dir 2018/09/13 下午 04:20 2018/09/13 下午 04:20 2018/09/10 下午 03:04 38,914 saved_model.pb 2018/09/13 下午 04:20 (base) D:JKTemp1536563059>python C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermo_tf.py --saved_model_dir D:JKTemp1536563059 --input_shape [1,28,28] --input "Placeholder" Model Optimizer arguments: Common parameters: - Path to the Input Model: None - Path for generated IR: D:JKTemp1536563059. - IR output name: saved_model - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Placeholder - Output layers: Not specified, inherited from the model - Input shapes: [1,28,28] - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: False - Reverse input channels: False TensorFlow specific parameters: - Input model in text protobuf format: False - Offload unsupported operations: False - Path to model dump for TensorBoard: None - Update the configuration file with input/output node names: None - Use configuration file used to generate the model with Object Detection API: None - Operations to offload: None - Patterns to offload: None - Use the config file: None Model Optimizer version: 1.2.185.5335e231 C:ProgramDataAnaconda3libsite-packagesh5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters [ ERROR ] ------------------------------------------------- [ ERROR ] ----------------- INTERNAL ERROR ---------------- [ ERROR ] Unexpected exception happened. [ ERROR ] Please contact Model Optimizer developers and forward the following information: [ ERROR ] [ ERROR ] Traceback (most recent call last): File "C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomain.py", line 321, in main return driver(argv) File "C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomain.py", line 263, in driver mean_scale_values=mean_scale) File "C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermopipelinetf.py", line 264, in tf2nx convert_add_to_scaleshift(graph) # scale = 1 File "C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomiddlepassesconv.py", line 361, in convert_add_to_scaleshift tensor_id, value_id = get_tensor_id(node), get_value_id(node) File "C:intelcomputer_vision_sdk_2018.3.343deployment_toolsmodel_optimizermomiddlepassesfusinghelpers.py", line 28, in get_tensor_id assert node.has_valid('op') and (node.op == 'Mul' or node.op == 'Add') AssertionError [ ERROR ] ---------------- END OF BUG REPORT -------------- [ ERROR ] ------------------------------------------------- Thanks, Jack |
|
|
|
嗨杰克,The1536563059文件夹包含'variables'文件夹和'saved_model.pb'文件。请你分享你用来生成.pb文件的步骤,因为我们无法按照提供的github链接中的程序生成它。 问候,多纳 以上来自于谷歌翻译 以下为原文 Hi Jack, The 1536563059 folder contains 'variables' folder and 'saved_model.pb' file. Could you please share the steps you used to generate the .pb file as we are not able to generate it by following the procedures in the provided github link. Regards, Dona |
|
|
|
jerry1978 发表于 2018-11-12 19:07 嗨,多纳 这是我的步骤。 1> cd D: xxxx models-master official mnist 2>修改mnist.py,修改“导出模型”的段如下。 #导出模型 image = tf.placeholder(tf.float32,[None,28,28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image':图片, }) mnist_classifier.export_savedmodel('export',input_fn) “”” 如果flags_obj.export_dir不是None: image = tf.placeholder(tf.float32,[None,28,28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image':图片, }) mnist_classifier.export_savedmodel(flags_obj.export_dir,input_fn) “”” 3> python mnist.py 我在Windows 10中使用带有python 3.6的anaconda发行版。 和tensorflow-gpu 1.10.0。 谢谢, 插口 以上来自于谷歌翻译 以下为原文 Hi, Dona Here are my steps. 1> cd D:xxxxmodels-masterofficialmnist 2> modify mnist.py, modify the segment of "export the model" as following. # Export the model image = tf.placeholder(tf.float32, [None, 28, 28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image': image, }) mnist_classifier.export_savedmodel('export', input_fn) ''' if flags_obj.export_dir is not None: image = tf.placeholder(tf.float32, [None, 28, 28]) input_fn = tf.estimator.export.build_raw_serving_input_receiver_fn({ 'image': image, }) mnist_classifier.export_savedmodel(flags_obj.export_dir, input_fn) ''' 3> python mnist.py I'm using anaconda distribution with python 3.6, in Windows 10. And tensorflow-gpu 1.10.0. Thanks, Jack |
|
|
|
嗨杰克,我们能够从我们的最终复制这个问题。我们将以你的问题的决议回复。谢谢& 问候, Astha 以上来自于谷歌翻译 以下为原文 Hi Jack, We were able to replicate the issue from our end. We will revert with the resolution to your issue. Thanks & Regards, Astha |
|
|
|
非常感谢,Astha。 -插口 以上来自于谷歌翻译 以下为原文 Many thanks, Astha. -Jack |
|
|
|
None 以上来自于谷歌翻译 以下为原文 Hi Jack, We have escalated the issue to the subject matter expert on OpenVINO/cvsdk and will keep you posted on the updates. Thanks and Regards, Astha |
|
|
|
None 以上来自于谷歌翻译 以下为原文 Hi, Astha Got it and Thanks, Jack |
|
|
|
None 以上来自于谷歌翻译 以下为原文 Hi Jack, SME responded saying that, the problem could be due to the incorrect freezing of graph before providing to ModelOptimizer or could be due to some other issues that needs further debugging. SME suggested to forward the ticket to the computer vision forum for better support. Have raised a new thread on your behalf. Please find the link below: https://software.intel.com/en-us/forums/computer-vision/topic/797807 Regards, Anju |
|
|
|
None 以上来自于谷歌翻译 以下为原文 Hi Jack, Closing this thread since the computer vision forum would be able to solve your problem better. Feel free to raise another thread for further issues. Regards, Anju |
|
|
|
None 以上来自于谷歌翻译 以下为原文 Hi, Anju Got it, thanks. -Jack |
|
|
|
只有小组成员才能发言,加入小组>>
466浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 14:54 , Processed in 1.087191 second(s), Total 113, Slave 96 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号