【tensorflow】tf-argmax()
生活随笔
收集整理的這篇文章主要介紹了
【tensorflow】tf-argmax()
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
import tensorflow as tfinput = [1, 3, 5, 7]output = ([[1, 2],[3, 5]])a = tf.argmax(input, 0) # 0表是按行b = tf.argmax(output, 1) # 1 表示按列with tf.Session() as sess:print("輸出input最大值的索引下標:", sess.run(a))print("輸出output最大值的索引下標,這是一個二維數組:",sess.run(b))
#rerurn:
3
[1 1]
與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的【tensorflow】tf-argmax()的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【计网】计算机网络-物理层【理论1-2】
- 下一篇: 【tensorflow】tf-tf.wh