Add a L2 norm distance layer.
Created by: lcy-seso
The similarity metric is very useful. Currently, we only have cosine similarity, which is not enough. The l2 norm distance is required by one of our users.
- Due to lacking an inner product layer, the l2 distance cannot be constructed by combining some primary math layers.
- Implementing the L2 distance in one layer is more time and memory efficient than the combination of some primary math layers.