Code Monkey home page Code Monkey logo

natasha2's Introduction

Natasha2

Implementation of Natasha1.5 and Natasha2 algorithm in PyTorch

Natasha1.5 & Natasha2 algorithm in Pytorch

Full technical report: technical_report.pdf

This repo contains a PyTorch implementation of Natasha2 from the paper "Natasha 2: Faster Non-Convex Optimization Than SGD" by Zeyuan Allen-Zhu.

To run experiments in MNIST or CIFAR-10, please use notebook MNIST.ipynb and CIFAR.ipynb

Experimental results

We tested both Natasha1.5 and Natasha2 on two models -- Mini-LeNet-4 and ResNet-18 (see models.py for architecture details).

Mini-LeNet-4 contains only ~600 parameters and ResNet-18 contains standard 11M parameters. We constructed a mini version of LeNet-4 because Natasha2 requires a second order hessian matrix which is extremely computationally expensive. Thus, given our hardware resources, we are able to train a Mini-LeNet-4 with reasonable period of training time.

Note: Mini-LeNet-4 doesn't have enough capacity to classify CIFAR-10, thus having strange learning curves

Learning Curves

ResNet-18 trained on CIFAR-10

Alt text

ResNet-18 trained on MNIST

Alt text

Mini-LeNet-4 trained on CIFAR-10

Alt text

Mini-LeNet-4 trained on MNIST

Alt text

natasha2's People

Contributors

ruoshiliu avatar alexliyihao 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.