TF之TFOD-API:基于tensorflow框架利用TFOD-API脚本文件将YoloV3训练好的.ckpt模型文件转换为推理时采用的.pb文件
生活随笔
收集整理的這篇文章主要介紹了
TF之TFOD-API:基于tensorflow框架利用TFOD-API脚本文件将YoloV3训练好的.ckpt模型文件转换为推理时采用的.pb文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
TF之TFOD-API:基于tensorflow框架利用TFOD-API腳本文件將YoloV3訓練好的.ckpt模型文件轉換為推理時采用的frozen_inference_graph.pb文件
?
?
目錄
導出前后文件結果
輸出結果記錄
?
?
?
導出前后文件結果
?
?
?
輸出結果記錄
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:?
?
?
?
總結
以上是生活随笔為你收集整理的TF之TFOD-API:基于tensorflow框架利用TFOD-API脚本文件将YoloV3训练好的.ckpt模型文件转换为推理时采用的.pb文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TF学习——TF之TFOD:基于TFOD
- 下一篇: CV之MTCNN:MTCNN算法过程及其