Code Monkey home page Code Monkey logo

asimplenncmake's Introduction

一个神经网络的实现(C++)

写在前面

  • 可以使用该程序构建任意层数任意神经元数目的神经网络(只要内存足够!)
  • 理论上讲,只要输入采用one-hot encoding的方式,任务目标为有监督的多分类,该网络都可行

环境和依赖

  • CMake==3.13.4
  • GCC==8.3.0
  • Eigen==3.3.8

程序在上述环境下可编译通过并正确运行。

例子

以MNIST数据集为例:

  • 5层网络
  • 神经元数目分别为{784, 64, 128, 64, 10}
  • (-1,1)均匀分布初始化w和b
  • 步长eta取0.1
  • 步长衰减系数alpha取0.9
  • 训练30次

我运行的那一次:

训练集准确率:0.991367

测试集准确率:0.9682

参考

  1. 李航《统计学习方法》(第二版)
  2. Michael Nielsen《Neural Networks and Deep Learning》http://neuralnetworksanddeeplearning.com/index.html

asimplenncmake's People

Contributors

yaohui1996 avatar

Stargazers

dertaek—wzh avatar

Watchers

 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.