Coder Social home page Coder Social logo

ptyshevs / multilayer_perceptron Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 14.57 MB

Subset of Keras functionality implemented in pure numpy ๐Ÿฆ

Jupyter Notebook 97.06% Python 2.93% Shell 0.01%
neural-network numpy machine-learning convolutional-neural-networks reccurent-neural-network perceptron-neural-networks

multilayer_perceptron's Introduction

Multilayer Perceptron

Pure-numpy version of Keras for educational purposes.

Features

  • Keras-like model fitting procedure in nn.py
  • Activation functions (ReLU, ELU, Softmax) in activations.py
  • Early Stopping and ModelCheckpoint callbacks in callbacks.py
  • Multiple layers available (Dense, BatchNorm, Dropout) in layers.py
  • Different Optimizers (Momentum SGD, RMSProp, Adam) and learning-rate schedulers in optim.py

Usage

import mlp
from mlp.nn import NeuralNetwork, Dense
from mlp.tools import one_hot_encoder
from mlp.metrics import cv_score, accuracy
from sklearn.datasets import load_iris

X, y = load_iris(return_X_y=True)

y_enc, _ = one_hot_encoder(y)

model = NeuralNetwork(loss='crossentropy')
model.add(Dense(3, activation='softmax'))
model.fit(X, y_enc, n_epochs=50)

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.