TF之TFOD-API:基于tensorflow框架利用TFOD-API脚本文件将YoloV3训练好的.ckpt模型文件转换为推理时采用的.pb文件

简介: TF之TFOD-API:基于tensorflow框架利用TFOD-API脚本文件将YoloV3训练好的.ckpt模型文件转换为推理时采用的.pb文件

导出前后文件结果

image.png


输出结果记录

Instructions for updating:

keep_dims is deprecated, use keepdims instead

W0929 20:40:36.003197  1396 tf_logging.py:125] From F:\File_Python\Python_example\models-master\research\object_detection\predictors\heads\box_head.py:93: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.

Instructions for updating:

keep_dims is deprecated, use keepdims instead

WARNING:tensorflow:From F:\File_Python\Python_example\models-master\research\object_detection\exporter.py:280: get_or_create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.

Instructions for updating:

Please switch to tf.train.get_or_create_global_step

W0929 20:40:37.104074  1396 tf_logging.py:125] From F:\File_Python\Python_example\models-master\research\object_detection\exporter.py:280: get_or_create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.

Instructions for updating:

Please switch to tf.train.get_or_create_global_step

WARNING:tensorflow:From F:\File_Python\Python_example\models-master\research\object_detection\exporter.py:434: print_model_analysis (from tensorflow.contrib.tfprof.model_analyzer) is deprecated and will be removed after 2018-01-01.

Instructions for updating:

Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. Build `options` with `tf.profiler.ProfileOptionBuilder`. See README.md for details

W0929 20:40:37.111633  1396 tf_logging.py:125] From F:\File_Python\Python_example\models-master\research\object_detection\exporter.py:434: print_model_analysis (from tensorflow.contrib.tfprof.model_analyzer) is deprecated and will be removed after 2018-01-01.

Instructions for updating:

Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. Build `options` with `tf.profiler.ProfileOptionBuilder`. See README.md for details

568 ops no flops stats due to incomplete shapes.

Parsing Inputs...

Incomplete shape.

=========================Options=============================

-max_depth                  10000

-min_bytes                  0

-min_peak_bytes             0

-min_residual_bytes         0

-min_output_bytes           0

-min_micros                 0

-min_accelerator_micros     0

-min_cpu_micros             0

-min_params                 0

-min_float_ops              0

-min_occurrence             0

-step                       -1

-order_by                   name

-account_type_regexes       _trainable_variables

-start_name_regexes         .*

-trim_name_regexes          .*BatchNorm.*

-show_name_regexes          .*

-hide_name_regexes

-account_displayed_op_only  true

-select                     params

-output                     stdout:

==================Model Analysis Report======================

Incomplete shape.

Doc:

scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.

param: Number of parameters (in the Variable).

Profile:

node name | # parameters

_TFProfRoot (--/59.45m params)

 Conv (--/5.01m params)

   Conv/biases (512, 512/512 params)

   Conv/weights (3x3x1088x512, 5.01m/5.01m params)

 FirstStageBoxPredictor (--/36.94k params)

   FirstStageBoxPredictor/BoxEncodingPredictor (--/24.62k params)

     FirstStageBoxPredictor/BoxEncodingPredictor/biases (48, 48/48 params)

     FirstStageBoxPredictor/BoxEncodingPredictor/weights (1x1x512x48, 24.58k/24.58k params)

   FirstStageBoxPredictor/ClassPredictor (--/12.31k params)

     FirstStageBoxPredictor/ClassPredictor/biases (24, 24/24 params)

     FirstStageBoxPredictor/ClassPredictor/weights (1x1x512x24, 12.29k/12.29k params)

 FirstStageFeatureExtractor (--/26.84m params)

   FirstStageFeatureExtractor/InceptionResnetV2 (--/26.84m params)

     FirstStageFeatureExtractor/InceptionResnetV2/Conv2d_1a_3x3 (--/864 params)

       FirstStageFeatureExtractor/InceptionResnetV2/Conv2d_1a_3x3/BatchNorm (--/0 params)

…………

           SecondStageFeatureExtractor/InceptionResnetV2/Repeat/block8_9/Conv2d_1x1/biases (2080, 2.08k/2.08k params)

           SecondStageFeatureExtractor/InceptionResnetV2/Repeat/block8_9/Conv2d_1x1/weights (1x1x448x2080, 931.84k/931.84k params)

======================End of Report==========================

568 ops no flops stats due to incomplete shapes.

Parsing Inputs...

Incomplete shape.

=========================Options=============================

-max_depth                  10000

-min_bytes                  0

-min_peak_bytes             0

-min_residual_bytes         0

-min_output_bytes           0

-min_micros                 0

-min_accelerator_micros     0

-min_cpu_micros             0

-min_params                 0

-min_float_ops              1

-min_occurrence             0

-step                       -1

-order_by                   float_ops

-account_type_regexes       .*

-start_name_regexes         .*

-trim_name_regexes          .*BatchNorm.*,.*Initializer.*,.*Regularizer.*,.*BiasAdd.*

-show_name_regexes          .*

-hide_name_regexes

-account_displayed_op_only  true

-select                     float_ops

-output                     stdout:

==================Model Analysis Report======================

Incomplete shape.

Doc:

scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.

flops: Number of float operations. Note: Please read the implementation for the math behind it.

Profile:

node name | # float_ops

_TFProfRoot (--/3.42k flops)

 map_1/while/mul_3 (300/300 flops)

 map_1/while/mul_2 (300/300 flops)

 map_1/while/mul_1 (300/300 flops)

 map_1/while/mul (300/300 flops)

 map/while/ToNormalizedCoordinates/Scale/mul_3 (300/300 flops)

 map/while/ToNormalizedCoordinates/Scale/mul_2 (300/300 flops)

 map/while/ToNormalizedCoordinates/Scale/mul_1 (300/300 flops)

 map/while/ToNormalizedCoordinates/Scale/mul (300/300 flops)

 GridAnchorGenerator/mul (12/12 flops)

 GridAnchorGenerator/truediv (12/12 flops)

 GridAnchorGenerator/mul_2 (12/12 flops)

 GridAnchorGenerator/mul_1 (12/12 flops)

 FirstStageFeatureExtractor/InceptionResnetV2/InceptionResnetV2/Repeat_1/block17_10/Branch_1/Conv2d_0c_7x1/required_space_to_batch_paddings/add (2/2 flops)

 FirstStageFeatureExtractor/InceptionResnetV2/InceptionResnetV2/Repeat_1/block17_8/Conv2d_1x1/required_space_to_batch_paddings/add (2/2 flops)

 ……

 BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Equal (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField_1/Equal (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_1 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_2 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_3 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_4 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_5 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_6 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_1 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_10 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_11 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_12 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_13 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_2 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_3 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_4 (1/1 flops)

 GridAnchorGenerator/add_3 (1/1 flops)

 GridAnchorGenerator/add_4 (1/1 flops)

 GridAnchorGenerator/assert_equal/Equal (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/Less (1/1 flops)

 Decode/transpose_1/sub (1/1 flops)

 Decode/transpose/sub (1/1 flops)

 GridAnchorGenerator/mul_7 (1/1 flops)

 GridAnchorGenerator/mul_8 (1/1 flops)

 Decode/get_center_coordinates_and_sizes/transpose/sub (1/1 flops)

 GridAnchorGenerator/zeros/Less (1/1 flops)

 Preprocessor/map/while/Less (1/1 flops)

 Preprocessor/map/while/Less_1 (1/1 flops)

 Preprocessor/map/while/ResizeToRange/Greater (1/1 flops)

 Preprocessor/map/while/ResizeToRange/Maximum (1/1 flops)

 Preprocessor/map/while/ResizeToRange/Minimum (1/1 flops)

 Preprocessor/map/while/ResizeToRange/mul (1/1 flops)

 Preprocessor/map/while/ResizeToRange/mul_1 (1/1 flops)

 Preprocessor/map/while/ResizeToRange/mul_2 (1/1 flops)

 Preprocessor/map/while/ResizeToRange/mul_3 (1/1 flops)

 Preprocessor/map/while/ResizeToRange/truediv (1/1 flops)

 Preprocessor/map/while/ResizeToRange/truediv_1 (1/1 flops)

 Preprocessor/map/while/add (1/1 flops)

 Preprocessor/map/while/add_1 (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/Less (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/Less_1 (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ChangeCoordinateFrame/sub (1/1 flops)

 ……

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_9 (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater (1/1 flops)

 

……

SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_9 (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/add (1/1 flops)

 SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/add_1 (1/1 flops)

 SecondStagePostprocessor/Decode/get_center_coordinates_and_sizes/transpose/sub (1/1 flops)

 SecondStagePostprocessor/Decode/transpose/sub (1/1 flops)

 SecondStagePostprocessor/Decode/transpose_1/sub (1/1 flops)

 map/while/Less (1/1 flops)

 map/while/Less_1 (1/1 flops)

 BatchMultiClassNonMaxSuppression/ones/Less (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/add_1 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/add (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_9 (1/1 flops)

 map/while/ToNormalizedCoordinates/truediv (1/1 flops)

 map/while/ToNormalizedCoordinates/truediv_1 (1/1 flops)

 map/while/add (1/1 flops)

 map/while/add_1 (1/1 flops)

 map_1/while/Less (1/1 flops)

 map_1/while/Less_1 (1/1 flops)

 map_1/while/add (1/1 flops)

 map_1/while/add_1 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_8 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_7 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_6 (1/1 flops)

 BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_5 (1/1 flops)

 mul (1/1 flops)

======================End of Report==========================

2018-09-29 20:40:47.042684:


相关文章
|
16天前
|
自然语言处理 安全 API
API First:模型驱动的阿里云API保障体系
本文介绍了阿里云在API设计和管理方面的最佳实践。首先,通过API First和模型驱动的方式确保API的安全、稳定和效率。其次,分享了阿里云内部如何使用CloudSpec IDL语言及配套工具保障API质量,并实现自动化生成多语言SDK等工具。接着,描述了API从设计到上线的完整生命周期,包括规范校验、企业级能力接入、测试和发布等环节。最后,展望了未来,强调了持续提升API质量和开源CloudSpec IDL的重要性,以促进社区共建更好的API生态。
|
3月前
|
机器学习/深度学习 TensorFlow 算法框架/工具
深度学习之格式转换笔记(三):keras(.hdf5)模型转TensorFlow(.pb) 转TensorRT(.uff)格式
将Keras训练好的.hdf5模型转换为TensorFlow的.pb模型,然后再转换为TensorRT支持的.uff格式,并提供了转换代码和测试步骤。
118 3
深度学习之格式转换笔记(三):keras(.hdf5)模型转TensorFlow(.pb) 转TensorRT(.uff)格式
|
3月前
|
并行计算 Shell TensorFlow
Tensorflow-GPU训练MTCNN出现错误-Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
在使用TensorFlow-GPU训练MTCNN时,如果遇到“Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED”错误,通常是由于TensorFlow、CUDA和cuDNN版本不兼容或显存分配问题导致的,可以通过安装匹配的版本或在代码中设置动态显存分配来解决。
73 1
Tensorflow-GPU训练MTCNN出现错误-Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
|
8天前
|
机器学习/深度学习 人工智能 安全
GLM-Zero:智谱AI推出与 OpenAI-o1-Preview 旗鼓相当的深度推理模型,开放在线免费使用和API调用
GLM-Zero 是智谱AI推出的深度推理模型,专注于提升数理逻辑、代码编写和复杂问题解决能力,支持多模态输入与完整推理过程输出。
112 24
GLM-Zero:智谱AI推出与 OpenAI-o1-Preview 旗鼓相当的深度推理模型,开放在线免费使用和API调用
|
3月前
|
数据采集 TensorFlow 算法框架/工具
【大作业-03】手把手教你用tensorflow2.3训练自己的分类数据集
本教程详细介绍了如何使用TensorFlow 2.3训练自定义图像分类数据集,涵盖数据集收集、整理、划分及模型训练与测试全过程。提供完整代码示例及图形界面应用开发指导,适合初学者快速上手。[教程链接](https://www.bilibili.com/video/BV1rX4y1A7N8/),配套视频更易理解。
78 0
【大作业-03】手把手教你用tensorflow2.3训练自己的分类数据集
|
27天前
|
存储 人工智能 API
AgentScope:阿里开源多智能体低代码开发平台,支持一键导出源码、多种模型API和本地模型部署
AgentScope是阿里巴巴集团开源的多智能体开发平台,旨在帮助开发者轻松构建和部署多智能体应用。该平台提供分布式支持,内置多种模型API和本地模型部署选项,支持多模态数据处理。
203 4
AgentScope:阿里开源多智能体低代码开发平台,支持一键导出源码、多种模型API和本地模型部署
|
2月前
|
SQL 测试技术 API
如何编写API接口的自动化测试脚本
本文详细介绍了编写API自动化测试脚本的方法和最佳实践,涵盖确定测试需求、选择测试框架、编写测试脚本(如使用Postman和Python Requests库)、参数化和数据驱动测试、断言和验证、集成CI/CD、生成测试报告及维护更新等内容,旨在帮助开发者构建高效可靠的API测试体系。
|
2月前
|
人工智能 Java API
ChatClient:探索与AI模型通信的Fluent API
【11月更文挑战第22天】随着人工智能(AI)技术的飞速发展,越来越多的应用场景开始融入AI技术以提升用户体验和系统效率。在Java开发中,与AI模型通信成为了一个重要而常见的需求。为了满足这一需求,Spring AI引入了ChatClient,一个提供流畅API(Fluent API)的客户端,用于与各种AI模型进行通信。本文将深入探讨ChatClient的底层原理、业务场景、概念、功能点,并通过Java代码示例展示如何使用Fluent API与AI模型进行通信。
62 8
|
4月前
|
人工智能 Serverless API
一键服务化:从魔搭开源模型到OpenAI API服务
在多样化大模型的背后,OpenAI得益于在领域的先发优势,其API接口今天也成为了业界的一个事实标准。
一键服务化:从魔搭开源模型到OpenAI API服务
|
3月前
|
机器学习/深度学习 移动开发 TensorFlow
深度学习之格式转换笔记(四):Keras(.h5)模型转化为TensorFlow(.pb)模型
本文介绍了如何使用Python脚本将Keras模型转换为TensorFlow的.pb格式模型,包括加载模型、重命名输出节点和量化等步骤,以便在TensorFlow中进行部署和推理。
165 0

热门文章

最新文章