reshalfahsi / neuralnetwork

Implementation of Artificial Neural Network Algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neural Network

license ci testing

A naive implementation of a neural network. The code structure is heavily inspired by PyTorch and TensorFlow. However, this package is used for educational purposes and is not intended to be adopted in production.

Installation

git clone https://github.com/reshalfahsi/neuralnetwork
cd neuralnetwork
pip install .

Quick Demo

Here is a short example of the usage of neuralnetwork components. For the complete demo, please take a look at examples/classification.py and notebook/Classification.ipynb for the classification problem. We also provide am example for regression problem: examples/regression.py and notebook/Regression.ipynb.

import neuralnetwork.nn as nn
import numpy as np

input = np.random.randn(1, 1, 200)
m = nn.Linear(200, 100)
out = m(input)

print(out.shape)
# (1, 1, 100)

About

Implementation of Artificial Neural Network Algorithm

License:MIT License


Languages

Language:Jupyter Notebook 93.4%Language:Python 6.6%