Siamese Neural Networks with Triplet Loss and Cosine Distance

Theory & Code-along: Triplet loss with cosine distance for Siamese Networks on CIFAR-10 dataset

Tan Pengshi Alvin
Towards Data Science
11 min readMay 12, 2023

--

Image by Alex Meier on Unsplash

What if we could encode every object image (human faces, etc) into a template — a vector of numbers? Thereafter, we could objectively determine the similarity between objects by numerically comparing —…

--

--

Data Scientist, AI and Software Engineer 🇸🇬. Shares simple codes, technical Data Science concepts and ideas. LinkedIn: https://www.linkedin.com/in/tanpengshi/