Deep Learning on Small Datasets without Pre-Training using Cosine Loss

Björn Barz, Joachim Denzler
1/25/2019
cs.LGcs.CVstat.ML

Official code: cvjena/semantic-embeddings (269 stars, Python, MIT, TensorFlow, last commit 2021-04-26).

Abstract

Two things seem to be indisputable in the contemporary deep learning discourse: 1. The categorical cross-entropy loss after softmax activation is the method of choice for classification.

Show full abstract

2. Training a CNN classifier from scratch on small datasets does not work well. In contrast to this, we show that the cosine loss function provides significantly better performance than cross-entropy on datasets with only a handful of samples per class. For example, the accuracy achieved on the CUB-200-2011 dataset without pre-training is by 30% higher than with the cross-entropy loss. Further experiments on other popular datasets confirm our findings. Moreover, we demonstrate that integrating prior knowledge in the form of class hierarchies is straightforward with the cosine loss and improves classification performance further.

View on arXivView PDF

Code Implementations(1)

TensorFlowMIT

Hierarchy-based Image Embeddings for Semantic Image Retrieval

26949PythonNov 9, 20185 years agoMIT
computer-visiondeep-learningimage-retrievalkerasmachine-learning+5 more

Similar Papers

Cite this paper

@article{barz2019deep,
  title  = {Deep Learning on Small Datasets without Pre-Training using Cosine Loss},
  author = {Björn Barz and Joachim Denzler},
  year   = {2019},
  eprint = {1901.09054},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1901.09054}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1901.09054.svg)](https://codeofpaper.com/paper/1901.09054)

Discussion