import numpy as np
import tensorflow as tf
A = [1,3,4,5,6,1,2,3,4,5]
B = [1,3,4,3,2,2,2,3,4,3]
with tf.Session() as sess:
a=sess.run(tf.equal(A, B))
b=a.tolist().count(True)
print(a.tolist())
print(b)
原文地址:https://www.cnblogs.com/Ann21/p/11107864.html
时间: 2024-10-11 00:41:44