Coder Social home page Coder Social logo

gabmoreira / hyper Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 150 KB

Code for Hyperbolic vs Euclidean Embeddings in Few-Shot Learning: Two Sides of the Same Coin, WACV (2024)

Python 100.00%
few-shot-learning hyperbolic image-recognition torch embeddings

hyper's Introduction

Training

Create an experiments folder in the parent directory of ./code/

mkdir ./experiments/

Edit the cfg dictionary in train.py according to the desired specifications Move to the parent directory and run the train.py script

python ./code/train.py

During training an automatic experiment name is generated and the best model weights will be stored at ./experiments/<experiment_name>/best_weights.pt

The cfg dictionary is saved as ./experiments/<experiment_name>/cfg.pt

The tracker CSV with train and validation accuracies and losses is saved as ./experiments/<experiment_name>/tracker.csv

Testing

For testing a trained model simply provide the experiment name and the shot/way/query regime you want to test it on

python ./code/test.py ./experiments/<experiment_name> <shot> <way> <query>

References

G Moreira, M Marques, JP Costeira, and A Hauptmann. "Hyperbolic vs Euclidean Embeddings in Few-Shot Learning: Two Sides of the Same Coin." WACV 2024 (To appear) arXiv:2309.10013.

hyper's People

Contributors

gabmoreira avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.