Coder Social home page Coder Social logo

hx-idiot / one-shot-siamese Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amwons/one-shot-siamese

0.0 1.0 0.0 1.94 MB

A PyTorch Implementation of "Siamese Neural Networks for One-shot Image Recognition"

Jupyter Notebook 61.09% Python 38.21% Shell 0.70%

one-shot-siamese's Introduction

Siamese Networks for One-Shot Learning

Drawing

Paper Modifications

I've done some slight modifications to the paper to eliminate variables while I debug my code. Specifically, validation and test accuracy currently suck so I'm checking if there's a bug either in the dataset generation or trainer code.

  • I'm using Relu -> Maxpool rather than Maxpool - Relu.
  • I'm using batch norm between the conv layers.
  • I'm using He et. al. initialization.
  • I'm using a global learning rate, l2 reg factor, and momentum rather than per-layer parameters.

Omniglot Dataset

Drawing Drawing Drawing

Execute the following commands

  • Download the data using run.sh
    • chmod +x run.sh
    • ./run.sh
  • Process the data using data_prep.ipynb

Then, you can load the dataset using:

from data_loader import *

# batch size of 32 with data augmentation
train_loader, valid_loader = get_train_valid_loader(data_dir, 32, True)

for idx, (x, y) in enumerate(train_loader):
    # do something

Checkout Playground.ipynb for a minimal working example.

one-shot-siamese's People

Contributors

kevinzakka avatar

Watchers

James Cloos 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.