资源算法 Binary-Neural-Network-Keras

Binary-Neural-Network-Keras

2020-02-04 | |  38 |   0 |   0

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-nets

下一篇:Pytorch-XNOR-Net

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...