GithubHelp home page GithubHelp logo

nnc's Introduction

nn train in numpy and run in c

一个用于学习C语言数据结构和深度学习的长期项目

使用numpy构建多层感知机的模型进行训练,再将训练后的模型存储为C数组的形式,便于使用C进行部署。

矩阵运算

多层感知机的运算依赖于矩阵运算的实现,仓库中使用C语言实现了神经网络需要的基本的矩阵运算。

网络结构

想要C运行的结果和numpy训练的结果一致,就需要设计相同的网络结构,依赖于建立的矩阵运算库,C代码会自动读取python训练得到的参数维度并构建相同的模型结构进行运算。

示例

仓库中实现了多层感知机拟合实现异或门的例子。

项目中只实现了最基本的多层感知机,也就是多输入单输出的神经网络。

使用python部分进行训练的注意事项:

  • 训练时发现当输入层比第一层网络的节点数少一个节点,并且网络节点数以此递减时,cost下降会比较顺畅自然

  • 学习率的调节和训练次数需要根据实际情况进行调整

计划

  • 加入softmax实现多分类任务

  • 使用图片数据进行分类训练

  • 使用抑梯度参数初始化以使参数初始化更合理

  • 使用dropout和正则化使网络推理更高效

  • 实现基础的卷积神经网络

nnc's People

Contributors

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