代码是看您的调的RuntimeError: cosine_similarity requires both inputs to have the same sizes, but x1 has [8, 1, 512] and x2 has [1, 8, 512]
万分感谢