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:


相关文章
|
7月前
|
机器学习/深度学习 并行计算 小程序
DeepSeek-V3.2-Exp 发布,训练推理提效,API 同步降价
今天,我们正式发布 DeepSeek-V3.2-Exp 模型,这是一个实验性( Experimental)的版本。作为迈向新一代架构的中间步骤,V3.2-Exp 在 V3.1-Terminus 的基础上引入了 DeepSeek Sparse Attention(一种稀疏注意力机制…
868 0
DeepSeek-V3.2-Exp 发布,训练推理提效,API 同步降价
|
6月前
|
缓存 边缘计算 监控
89_批量推理:异步API调用
在当今数据密集型应用和大模型部署的时代,批量推理已成为提升系统性能和资源利用率的关键技术。随着深度学习模型规模的不断扩大和应用场景的日益复杂,如何高效地处理大量推理请求成为技术团队面临的重要挑战。传统的同步API调用方式在面对高并发、大规模数据处理时,往往会遇到响应延迟高、资源利用不充分等问题。异步API调用作为一种更高效的处理模式,通过非阻塞操作和并发处理能力,为批量推理场景提供了理想的解决方案。
510 0
|
6月前
|
机器学习/深度学习 PyTorch TensorFlow
66_框架选择:PyTorch vs TensorFlow
在2025年的大语言模型(LLM)开发领域,框架选择已成为项目成功的关键决定因素。随着模型规模的不断扩大和应用场景的日益复杂,选择一个既适合研究探索又能支持高效部署的框架变得尤为重要。PyTorch和TensorFlow作为目前市场上最主流的两大深度学习框架,各自拥有独特的优势和生态系统,也因此成为开发者面临的经典选择难题。
1234 0
用 Koa 框架实现一个简单的 RESTful API
用 Koa 框架实现一个简单的 RESTful API
232 26
|
11月前
|
API Python
飞桨x昇腾生态适配方案:13_API离线推理
ais_bench 提供了基于昇腾硬件的 Python API,用于离线模型(.om模型)推理。支持静态与动态API场景,如单个或多个OM模型推理。通过 `InferSession` 类加载模型并执行推理,可灵活处理输入输出形状转换。示例代码涵盖图片读取、形状调整、多模型串联推理及资源释放等操作,满足多样化推理需求。
778 26
|
机器学习/深度学习 人工智能 安全
GLM-Zero:智谱AI推出与 OpenAI-o1-Preview 旗鼓相当的深度推理模型,开放在线免费使用和API调用
GLM-Zero 是智谱AI推出的深度推理模型,专注于提升数理逻辑、代码编写和复杂问题解决能力,支持多模态输入与完整推理过程输出。
872 24
GLM-Zero:智谱AI推出与 OpenAI-o1-Preview 旗鼓相当的深度推理模型,开放在线免费使用和API调用
|
机器学习/深度学习 PyTorch TensorFlow
深度学习工具和框架详细指南:PyTorch、TensorFlow、Keras
在深度学习的世界中,PyTorch、TensorFlow和Keras是最受欢迎的工具和框架,它们为研究者和开发者提供了强大且易于使用的接口。在本文中,我们将深入探索这三个框架,涵盖如何用它们实现经典深度学习模型,并通过代码实例详细讲解这些工具的使用方法。
1177 0
|
机器学习/深度学习 数据采集 数据可视化
TensorFlow,一款由谷歌开发的开源深度学习框架,详细讲解了使用 TensorFlow 构建深度学习模型的步骤
本文介绍了 TensorFlow,一款由谷歌开发的开源深度学习框架,详细讲解了使用 TensorFlow 构建深度学习模型的步骤,包括数据准备、模型定义、损失函数与优化器选择、模型训练与评估、模型保存与部署,并展示了构建全连接神经网络的具体示例。此外,还探讨了 TensorFlow 的高级特性,如自动微分、模型可视化和分布式训练,以及其在未来的发展前景。
1120 5
|
JSON JavaScript 中间件
Koa框架下的RESTful API设计与实现
在现代 Web 开发中,构建高效、可维护的 API 是至关重要的。Koa 是一个流行的 Node.js Web 应用框架,它具有简洁、灵活和强大的特性,非常适合用于设计和实现 RESTful API。
|
缓存 API 数据库
Python哪个框架合适开发速卖通商品详情api?
在跨境电商平台速卖通的商品详情数据获取与整合中,Python 语言及其多种框架(如 Flask、Django、Tornado 和 FastAPI)提供了高效解决方案。Flask 简洁灵活,适合快速开发;Django 功能全面,适用于大型项目;Tornado 性能卓越,擅长处理高并发;FastAPI 结合类型提示和异步编程,开发体验优秀。选择合适的框架需综合考虑项目规模、性能要求和团队技术栈。
182 2

热门文章

最新文章