亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

tensorflow 獲取所有variable或tensor的name示例

 更新時(shí)間:2020年01月04日 10:52:21   作者:_瀝川往事  
今天小編就為大家分享一篇tensorflow 獲取所有variable或tensor的name示例,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧

獲取所有variable(每個(gè)op中可訓(xùn)練的張量)的name:

for variable_name in tf.global_variables():
  print(variable_name)

獲取所有tensor(每個(gè)op的輸出張量)的name:

for tensor_name in tf.contrib.graph_editor.get_tensors(tf.get_default_graph()):
  print(tensor_name)

獲取所有op及其輸入輸出的name:

with tf.Session() as sess:
  for node in sess.graph_def.node:
    print(node)

以上這篇tensorflow 獲取所有variable或tensor的name示例就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論