Skip to content

reshalfahsi/neuralnetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

 
 
 

Contributors