Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/reshalfahsi/neuralnetwork

Implementation of Artificial Neural Network Algorithm
https://github.com/reshalfahsi/neuralnetwork

artificial-intelligence artificial-neural-networks deep-learning deep-neural-networks gradient-descent machine-learning medical-image-processing medical-insurance-costs medmnist neural-network newton-method python

Last synced: about 6 hours ago
JSON representation

Implementation of Artificial Neural Network Algorithm

Awesome Lists containing this project

README

        

# Neural Network


license
ci testing

A naive implementation of a neural network. The code structure is heavily inspired by [PyTorch](https://github.com/pytorch/pytorch) and [TensorFlow](https://github.com/tensorflow/tensorflow). However, this package is used for educational purposes and is not intended to be adopted in production.

## Installation

```bash
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`](https://github.com/reshalfahsi/neuralnetwork/blob/main/examples/classification.py) and [`notebook/Classification.ipynb`](https://github.com/reshalfahsi/neuralnetwork/blob/main/notebook/Classification.ipynb) for the classification problem. We also provide am example for regression problem: [`examples/regression.py`](https://github.com/reshalfahsi/neuralnetwork/blob/main/examples/regression.py) and [`notebook/Regression.ipynb`](https://github.com/reshalfahsi/neuralnetwork/blob/main/notebook/Regression.ipynb).

```python
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)
```