我试图比较两个特征向量的相似性。在激活中是形状输出 (60000, 64),new_activation 的形状输出是 (10000, 64)。我正在寻找一种方法来找出 new_activation 中有多少向量与激活中的向量相似。我怎样才能做到这一点?
提前致谢
#put all the the training data in the activation layer
activation = feature_activation_model.predict(train_img)
print(activation.shape)
#########
#put the new or old data to compare their feature vectors
new_activation = feature_activation_model.predict(test_img)
print(new_activation.shape)