Coder Social home page Coder Social logo

netflow's Introduction

NetFlow


This is a simplified neural network framework to provide more people to understand how the neural network work and not only know how to use it.


Activation.py

This file includes some activation function, like relu, sigmoid, tahn, and other activation function still developing.


netflow.py

This file includes some layer operations or models, like MSE and cross entropy cost funtion, and linear operation.


Minst_test.py

This file includes a example about the minst classification task.


How to use this framework?

  • Linear
# Linear operation is W*X+b
# X is a feature matrix of input, and the size is m*n. 
# m is the number of tranning example, n is the number of feature
# W is a weight matrix, and the size is m*n
# m is the number of the input feature, and nn is the number of the neurons in the next layer
# b is a number or a vector, it can be broadcast by the numpy matrix, so you don't need to worry about that we can not add a number to a matrix.
layer = Linear(X, W, b)
  • Sigmoid
# Sigmoid function is a activation function to calculate each value in the input matrix
s = Sigmoid(layer)
  • Cross_Entropy
# Cross_Entropy cost function is a model to calculate the differentiate in the classification mission
# y is a label matrix from the training example, and the size is m*n
# m is the number of tranning example, n is the number of the categories, called label, the label must be one_hot label
# s is the result of computation of the neural network, and this size if m*n
# m is the number of tranning example, n is the number of the categories or the number of the neurons of the output layer

cost = Cross_Entropy(y, s)
  • MSE
# MSE cost function is a model to calculate the differentiate in Linear fitting mission
# y is a label vector from the training example, and the size is m*1
# m is the number of tranning example
# s is the result of computation of the neural network, and the size is m*1
# m is the number of tranning example
cost = MSE(y, s)

The whole process to use this framework is in minst_test.py file, which is a minst handwritting image classification example provide for you.

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.