Git Product home page Git Product logo

meta-pseudo-labels-pytorch's Introduction

Meta-Pseudo-Labels-Pytorch

Overview

This repo is a demonstration/implementation of Meta Pseudo Labels in pytorch using CIFAR 10. The Meta Pseudo Labels paper(https://arxiv.org/pdf/2003.10580.pdf), which is the basis for this repository, is currently SOTA for its proccessing requirement on Imagenet. This repository aims to make it easy for anyone to write a script in pytorch utilizing this technique. The soft Pseudo labels script works well for smaller models but becomes inefficent as the model size grows. The example model used within the Soft Pseudo labels script is of a comprable size to AlexNet. The Pytorch backend handles the gradient backprop through the student model for the soft labels script, but the novel method of backpropagation used in the paper is needed for the hard labels script.

Hard Label Script Specifics

The Hard label script uses two main equations to backtrace student loss to the teacher. The backtrace equations are simply more compuationally efficient derrivations of this basic equation which breaks down the problem into a simple chain rule equation where the gradient of the teacher in relation to the student is simply the student's gradient times the teacher's relation to the student's weights:

image

The teacher's relation to the student's weights is broken down using REINFORCE into two dependencies of the student and one dependency of the teacher, from this state it can be encoded into python.

image

The gradient of the teacher weights is implied to be the left side of the equation. The paper includes an equation to integrate UDA loss into this training regime, but that equation is ignored in this repo as that is not at the core of the paper or the methodology.

meta-pseudo-labels-pytorch's People

Contributors

johnnesbit 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.