Giter VIP home page Giter VIP logo

deepncm's Introduction

DeepNCM

PyTorch implementation of "DeepNCM: Deep Nearest Class Mean Classifiers" by Samantha Guerriero, Barbara Caputo and Thomas Mensink, ICLR Workshop 2018 (https://openreview.net/pdf?id=rkPLZ4JPM)

To run the code with standard DeepNCM on Cifar100, just run:

python training_ncm.py --dataset=100

change to dataset=10 for test on Cifar10. For visualization purposes, visdom is employed. To disable it just add the option --no_vis when to the above command.

The implementation of the layer is on ncm_layer.py . To apply the layer to any network, just replace the standard linear classifier with the NCM one and be aware of this 2 differences:

  • The forward step has 2 phases, a first phase which computes the features relative to the given images and a second phase which computes the class scores (-distances).
  • After the loss computation and backward, the means of the classifier must be updated.

For the incremental case, other 2 differences are present:

  • The forward step must be anticipated by a preparation step which adds to the network the space for novel class means.
  • The targets must be converted to the order in which the classifier have seen the classes, to align predictions and labels.

For both cases examples can be found in the relative training files and networks.

deepncm's People

Contributors

mancinimassimiliano avatar

Stargazers

Giacomo Cignoni avatar  avatar embneural avatar Code_Wr avatar  avatar  avatar  avatar Zhi Cao avatar Alena avatar Emanuel Sanchez Aimar avatar  avatar Elyor Kodirov avatar  avatar

Watchers

 avatar

Forkers

3koozy

deepncm'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.