Coder Social home page Coder Social logo

qiming-zou / monte_carlo_dropout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from statsu1990/monte_carlo_dropout

0.0 0.0 0.0 5.23 MB

Uncertainty estimation in deep learning using monte carlo dropout with keras

License: MIT License

Python 100.00%

monte_carlo_dropout's Introduction

monte_carlo_dropout

Uncertainty estimation in deep learning using monte carlo dropout with keras.
In this sample, estimate uncertainty in CNN classification of dogs and cats images using monte carlo dropout.
I examined CNN using sigmoid and softmax. Some of the results are shown below. Note that P(dog) is the probability of being a dog.

mrc
fig. [CNN using sigmoid] std of predicted P(dog) vs predicted P(dog) when using a dog image for input.
mrc
fig. [CNN using sigmoid] std of predicted P(dog) vs predicted P(dog) when using a cat image for input.

mrc
fig. [CNN using softmax] std of predicted P(dog) vs predicted P(dog) when using a dog image for input.
mrc
fig. [CNN using softmax] std of predicted P(dog) vs predicted P(dog) when using a cat image for input.

The details are described in the blog below.
https://st1990.hatenablog.com/entry/2019/07/31/010010

dnn_uncertainty.py

  • estimate uncertainty in classification of dogs and cats.

montecarlo_dropout.py

  • Convert keras model to model which uses dropout in inference.

classifier_cnn.py

  • Create binary calassification CNN model with dropout and L2 regularization.

cifar10_data.py

  • Treat cifar10 data.

monte_carlo_dropout

MC DropoutでのDLの不確かさ評価(keras)。
このサンプルでは、犬猫画像のCNNでの分類の不確かさを評価する。
詳細は以下のブログ参照。
https://st1990.hatenablog.com/entry/2019/07/31/010010

dnn_uncertainty.py

犬猫分類の不確かさを評価する。

montecarlo_dropout.py

kerasモデルを推論時にdropoutを使えるモデルに変換する。

classifier_cnn.py

dropoutとL2正則化を使った二値分類CNNを作成する。

cifar10_data.py

cifar10のデータを扱う。

monte_carlo_dropout's People

Contributors

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