日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CNN: 查看tensorflow Pb模型所有层的名字

發(fā)布時間:2023/12/31 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CNN: 查看tensorflow Pb模型所有层的名字 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

tensorflow的keras沒有外部可視化配置文件,需要使用netron查看模型參數(shù),或者從程序中打印出來,

打印代碼:

def get_all_layernames():"""get all layers name"""model_dir = os.path.join(ROOT_DIR, 'stru/')pb_file_path = os.path.join(ROOT_DIR, 'ModelTF/IncepV2MaskFrozen.pb')from tensorflow.python.platform import gfilesess = tf.Session()# with gfile.FastGFile(pb_file_path + 'model.pb', 'rb') as f:with gfile.FastGFile(pb_file_path, 'rb') as f:graph_def = tf.GraphDef()graph_def.ParseFromString(f.read())sess.graph.as_default()tf.import_graph_def(graph_def, name='')tensor_name_list = [tensor.name for tensor in tf.get_default_graph().as_graph_def().node]for tensor_name in tensor_name_list:print(tensor_name, '\n')""""---------------------作者:醉雨軒Y來源:CSDN原文:https: // blog.csdn.net / miao0967020148 / article / details / 89434253版權聲明:本文為博主原創(chuàng)文章,轉載請附上博文鏈接!"""return

顯示結果:

2019-05-28 14:28:50.036031: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4941 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
Const

ToFloat

Const_1

ToFloat_1

Const_2

ToFloat_2

image_tensor? #輸入層名稱

ToFloat_3

Preprocessor/map/Shape

Preprocessor/map/strided_slice/stack

Preprocessor/map/strided_slice/stack_1

......................

add_1/y

add_1

detection_boxes

detection_scores

detection_classes

num_detections

detection_masks#最后輸出層

?

?

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎

總結

以上是生活随笔為你收集整理的CNN: 查看tensorflow Pb模型所有层的名字的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。