【发布时间】:2021-09-29 05:03:33
【问题描述】:
preds = model([img_feat, ques_feat])
sorted_a = tf.sort(preds, direction='DESCENDING')
print(sorted_a[0][1])
它将打印tf.Tensor(0.35625213, shape=(), dtype=float32)。
这里我只需要数字 0.35625213 及其索引。
【问题讨论】:
-
添加更多细节和可重现的代码。
标签: tensorflow tensor