GithubHelp home page GithubHelp logo

dalalsunil1986 / binary-neural-network-keras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haosam/binary-neural-network-keras

0.0 0.0 0.0 36 KB

A Keras code on Binary Neural Networks

Python 100.00%

binary-neural-network-keras's Introduction

Binary-Neural-Network-Keras

A Keras code on Binary Neural Networks

Files to run in this order
Step 1: Run BNN_full_binary_io.py
This will give you your training for a Fully Connected 784-512-512-10 MLP layer. Binarization fo final weights is done at the end of training. Please edit the code for the binarization of your layers, if you added more layers
Step 1.1: Run Mnist_cnn.py
This will run the CNN model. BatchNorm and dropout has been commented out

Updated:

Step 2: Go into models folder. Run weight_extract_cnn.py (Run this if you ran mnist_cnn.py)
This will give you your binarized weights and conv layers on your final trained mode constrained to -1 and +1
Please edit the code for the binarization of your layers.

Step 3: (Results_validate folder) Either run BNN_new_train.py for evaluation of your saved weights loaded into a new model
OR
BNN_train_fun.py to test the trained results on real-time to see whether the model is able to predict your results

Note: Please Edit your PATH files

Miscellanous files (Do not Remove):

  • activations.py
  • binary_layers.py

(Results_validate Folder)

  • bnn_ip_binary.py (This is for fun to visualize the actual binarization of the input images)

binary-neural-network-keras's People

Contributors

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