input must have last dimension >= k = 3 but is 2 for 'TopKV2_這種錯誤是怎麼產生的

import tensorflow as tf import numpy as np # 創建一個長度爲10的向量,內部數據隨機生成。 a = tf.convert_to_tensor(np.random.random([10,2])) # 取出前5個最大的數據,默認從大到小進行排序。 b = tf.nn.top_k(a, 3) with tf.Session() as sess:
相關文章
相關標籤/搜索