GithubHelp home page GithubHelp logo

qwe's Introduction

qwe

相关文章解析-intro

相关文章解析-CNN实现


简介

简单的深度框架,参考Ng的深度学习课程作业,使用了keras的API设计。

方便了解网络具体实现,避免深陷于成熟框架的细节和一些晦涩的优化代码。

网络层实现了Dense, Flatten, Convolution2D, Activation, Dropout等。

优化算法实现了带有动量的梯度下降,同时还有一个带正则的优化算法备选。

权重初始化有多维高斯分布和Xavier initialization两种。

目标函数有MSE,CategoricalCrossEntropy。

在测试中有全连接网络与CNN手写字体识别示例。

环境与安装

python 3.x

依赖

  1. numpy
  2. sklearn
  3. matplotlib
  4. numba

安装

无需安装,使用前请先设置PYTHONPATH路径

qwe工程根目录

eg.qwe位于/home/test/qwe, 执行 export PYTHONPATH=$PYTHONPATH:/home/test/qwe

在config/basic.py中通过SWITCH_EXT选择是否开启扩展,默认关闭。

若选择开启,在qwe/src/ext目录下执行 python setup.py build_ext -i 即可

测试

在test目录下执行 python testfile.py 即可

目录结构

  1. src/
    1. ext/
      1. src/
        1. convUtil.pyx Cython的扩展,加速CNN
    2. layers/ 1.activation.py 激活函数,sigmoid, ReLU, tanh 1.convolution2D.py 卷积层 1.simple_convolution2D.py 简单卷积未优化 1.dense.py 全连接层 1.dropout.py 丢弃层? 1.flatten.py 拉伸层 1.pool.py 池化层,max average
    3. container.py 模型容器,equential
    4. initialization.py 参数初始化方法
    5. objective.py 目标函数
    6. optimizer.py 优化方法
    7. py_util.py py 实现的方法
    8. unit.py 计算单元
    9. util.py 一些方法
  2. test/
    1. parse_mnist.py 解析mnist图片
    2. test_col2img.py 测试
    3. test_mnist_cnn.py 使用CNN训练 mnist
    4. test_mnist_nn.py 使用全连接训练 mnist
    5. test_nn.py 使用全连接训练sklearn一个数据集
    6. test_objective.py 测试
    7. test_unit.py 测试

待续

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.