Siamese [[Siamese neural network]] is composed of two twin networks whose output is jointly trained. There is a function above to learn the relationship between input data sample pairs. The two networks are the same, sharing the same weight and network parameters.<ref name="paper4">[http://www.cs.toronto.edu/~rsalakhu/papers/oneshot1.pdf] Gregory Koch, Richard Zemel, Ruslan Salakhutdinov (2015). Siamese Neural Networks for One-shot Image Recognition. Department of Computer Science, University of Toronto. Toronto, Ontario, Canada.</ref>