This paper proposes a specialized artificial neural network layer named SimilarNet, designed to compare two feature vectors while considering the positions of their elements to produce an output in a vector format. By leveraging the advantages of the cosine similarity and concatenation layer, SimilarNet can effectively compare two vectors, enabling the construction of trained comparison models using multidimensional activation functions. In addition, SimilarNet can realize 1:1 comparisons of data with different shapes, unlike cosine similarity.