saschagrunert / Nn

Licence: mit
A tiny neural network 🧠

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Nn

Neural Network From Scratch
Ever wondered how to code your Neural Network using NumPy, with no frameworks involved?
Stars: ✭ 230 (+93.28%)
Mutual labels:  neural-networks, backpropagation
Artificialintelligenceengines
Computer code collated for use with Artificial Intelligence Engines book by JV Stone
Stars: ✭ 35 (-70.59%)
Mutual labels:  neural-networks, backpropagation
Genann
simple neural network library in ANSI C
Stars: ✭ 1,088 (+814.29%)
Mutual labels:  neural-networks, backpropagation
Faceswap
Deepfakes Software For All
Stars: ✭ 39,911 (+33438.66%)
Mutual labels:  neural-networks
Deep architect
A general, modular, and programmable architecture search framework
Stars: ✭ 110 (-7.56%)
Mutual labels:  neural-networks
Keras Contrib
Keras community contributions
Stars: ✭ 1,532 (+1187.39%)
Mutual labels:  neural-networks
The Math Behind A Neural Network
📄 The math behind the neural network used for Olivia
Stars: ✭ 119 (+0%)
Mutual labels:  backpropagation
Numpy Ml
Machine learning, in numpy
Stars: ✭ 11,100 (+9227.73%)
Mutual labels:  neural-networks
Growing Neural Cellular Automata
A reproduction of growing neural cellular automata using PyTorch.
Stars: ✭ 116 (-2.52%)
Mutual labels:  neural-networks
A Nice Mc
Code for "A-NICE-MC: Adversarial Training for MCMC"
Stars: ✭ 115 (-3.36%)
Mutual labels:  neural-networks
Simple Neural Networks
Simple neural networks based only on Numpy
Stars: ✭ 114 (-4.2%)
Mutual labels:  backpropagation
Elephas
Distributed Deep learning with Keras & Spark
Stars: ✭ 1,521 (+1178.15%)
Mutual labels:  neural-networks
Lightwood
Lightwood is Legos for Machine Learning.
Stars: ✭ 115 (-3.36%)
Mutual labels:  neural-networks
Adcme.jl
Automatic Differentiation Library for Computational and Mathematical Engineering
Stars: ✭ 106 (-10.92%)
Mutual labels:  neural-networks
Deephyper
DeepHyper: Scalable Asynchronous Neural Architecture and Hyperparameter Search for Deep Neural Networks
Stars: ✭ 117 (-1.68%)
Mutual labels:  neural-networks
Fast Style Transfer
TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
Stars: ✭ 10,240 (+8505.04%)
Mutual labels:  neural-networks
Openann
An open source library for artificial neural networks.
Stars: ✭ 117 (-1.68%)
Mutual labels:  neural-networks
Pygat
Pytorch implementation of the Graph Attention Network model by Veličković et. al (2017, https://arxiv.org/abs/1710.10903)
Stars: ✭ 1,853 (+1457.14%)
Mutual labels:  neural-networks
Xaynet
Xaynet represents an agnostic Federated Machine Learning framework to build privacy-preserving AI applications.
Stars: ✭ 111 (-6.72%)
Mutual labels:  neural-networks
Josef
A robot who learns how to draw
Stars: ✭ 115 (-3.36%)
Mutual labels:  neural-networks

ηn

A tiny neural network 🧠

This small neural network is based on the backpropagation algorithm.

Usage

A minimal usage example would look like this:

import AI.Nn (new
             ,predict
             ,train)

main :: IO ()
main = do
  {- Creates a new network with two inputs,
     two hidden layers and one output -}
  network <- new [2, 2, 1]

  {- Train the network for a common logical AND,
     until the maximum error of 0.01 is reached -}
  let trainedNetwork = train 0.01 network [([0, 0], [0])
                                          ,([0, 1], [0])
                                          ,([1, 0], [0])
                                          ,([1, 1], [1])]

  {- Predict the learned values -}
  let r00 = predict trainedNetwork [0, 0]
  let r01 = predict trainedNetwork [0, 1]
  let r10 = predict trainedNetwork [1, 0]
  let r11 = predict trainedNetwork [1, 1]

  {- Print the results -}
  putStrLn $ printf "0 0 -> %.2f" (head r00)
  putStrLn $ printf "0 1 -> %.2f" (head r01)
  putStrLn $ printf "1 0 -> %.2f" (head r10)
  putStrLn $ printf "1 1 -> %.2f" (head r11)

The result should be something like:

0 0 -> -0.02
0 1 -> -0.02
1 0 -> -0.01
1 1 -> 1.00

Hacking

To start hacking simply clone this repository and make sure that stack is installed. Then simply hack around and build the project with:

> stack build --file-watch

Contributing

You want to contribute to this project? Wow, thanks! So please just fork it and send me a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].