Giter VIP home page Giter VIP logo

additive-margin-softmax's Introduction

Additive-Margin-Softmax

Pytorch implementation of additive margin softmax loss [1].

loss = AMSloss(embedding_dim, no_classes, scale = 30.0, margin=0.4)
err = loss(x, labels)
err.backward()

where:

  • embedding_dim is embedding vector dimension
  • no_classes is number of classes to be embedded
  • scale is scale factor
  • margin is additive margin

Demo

A simple demo using Fashio-MNIST dataset [2] can be run by:

python demo.py

Results

AMSloss

[1] "Additive Margin Softmax for Face Verification." Wang, Feng, Jian Cheng, Weiyang Liu and Haijun Liu. IEEE Signal Processing Letters 25 (2018): 926-930.

[2] "Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms." Han Xiao, Kashif Rasul, Roland Vollgraf. arXiv:1708.07747

additive-margin-softmax's People

Contributors

tomastokar avatar

Stargazers

 avatar  avatar  avatar andy avatar Jaikirat Singh avatar Álvaro Baquedano Simón avatar Artem Goldort avatar 가비빙 avatar  avatar XuangeTHU avatar

Watchers

 avatar

additive-margin-softmax's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.