This document discusses triplet loss and embedding networks for image similarity. It proposes training an embedding network to map similar images closer together and dissimilar images farther apart in the embedded space. The network is trained using triplet loss, which minimizes the distance between an anchor and positive image (from the same class) while maximizing the distance between the anchor and a negative image (from a different class). Hard negative mining is used to select negative examples that violate the margin criterion. The network and loss function are differentiated to calculate gradients and update weights to learn embeddings that better satisfy the similarity and dissimilarity criteria.