@ptrblck, you are completly right.  It was a big mistake from my side. Thanks for see it! At this moment I am running the experiment again. To avoid future issues I am using cosine_similarity of pytorch. Thanks again!