资源算法studying-binary-neural-networks

studying-binary-neural-networks

2020-02-04 | |  42 |   0 |   0

An Empirical study of Binary Neural Networks' Optimisation

The source code used for experiments in the paper "An Empirical study of Binary Neural Networks' Optimisation".

The code grew organically as we tweaked more and more hyperparameters. Had I been more familiar with class-based declerations in TensorFlow (or embraded PyTorch sooner) the code would have been more elegant.

Environment

This code has been only tested with TensorFlow 1.8.0 and Python 3.5.4. The exact environment can be replicated by:

$ conda env create -f environment.yml

This would create a conda environment called studying-bnns.

Usage

$ conda activate studying-bnns# Run an experiment by passing args$ python run_with_args.py --model binary_connect_mlp 
    --dataset mnist --epochs 250 --batch-size 100 
    --binarization deterministic-binary# Run an experiment defined in a YAML filepython run_with_yaml.py some_experiment.yaml

An example experiment defintion in YAML file:

experiment-name: some_experimentmodel: binary_connect_cnndataset: cifar10epochs: 500batch_size: 50binarization: deterministic-binarylearning_rate:  type: exponential-decay
  start: 3e-3
  finish: 2e-6loss: 'square_hinge_loss'optimiser:  function: tf.train.AdamOptimizer
  kwargs: "{'beta1': 0.9, 'beta2': 0.999}"


上一篇:WebDriverManager.Net

下一篇:binary-nets

用户评价
全部评价

热门资源

  • seetafaceJNI

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

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

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