Giter Club home page Giter Club logo

knowledge-distillation-pytorch's People

Contributors

akarle avatar dependabot[bot] avatar forjiuzhou avatar haitongli avatar jl749 avatar

knowledge-distillation-pytorch's Issues

cross-entropy (log loss) & KL Divergence

how good or bad are the predicted probabilities??

low probability --> high penalty
-log(1.0) = 0
-log(0.8) = 0.22314
-log(0.6) = 0.51082

y = -log(x)
image

binary cross entropy (only 2 classes)
image

entropy (log-likelihood)

is a measure of the uncertainty associated with a given distribution

if every balls in a box is green
you have 0 uncertainty to get a red ball (0 entropy)

what if half of the balls are red and the other half blue?

image

image
if red:blue ratio is 20:80

H(q)=-(0.2log(0.2)+0.8log(0.8))=0.5

higher the entropy harder to predict

cross-entropy

cross entorpy between two distributions ...
image

If we, somewhat miraculously, match p(y) to q(y) perfectly, the computed values for both cross-entropy and entropy will match as well.

Since this is likely never happening, cross-entropy will have a BIGGER value than the entropy computed on the true distribution.

e.g.
red, green, blue (probability) = 0.8, 0.1, 0.1
predicted probability = 0.2, 0.2, 0.6
image

Kullback-Leibler Divergence (KL Divergence)

measure of dissimilarity between two distribution
difference between (cross-entropy and entropy)
image

student MNIST code reading + rewrite

what

read MNIST student model + rewrite in modular format

why

repo contains deprecated codes such as Variable

TODO:

  • read the code
  • rearrange the code
  • add evaluation progress bar (either multiprocessing or tqdm)

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.