https://github.com/mayukhdeb/patrick
Tiny neural net library written from scratch with cupy :warning: under construction :warning:
https://github.com/mayukhdeb/patrick
cuda deep-learning gpu-computing machine-learning neural-network regression
Last synced: about 2 months ago
JSON representation
Tiny neural net library written from scratch with cupy :warning: under construction :warning:
- Host: GitHub
- URL: https://github.com/mayukhdeb/patrick
- Owner: Mayukhdeb
- Created: 2020-12-16T17:59:19.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-20T17:29:28.000Z (over 5 years ago)
- Last Synced: 2025-02-12T22:22:22.877Z (over 1 year ago)
- Topics: cuda, deep-learning, gpu-computing, machine-learning, neural-network, regression
- Language: Python
- Homepage:
- Size: 563 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# patrick
> Spongebob's best friend
Tiny neural net library written from scratch with [cupy](https://cupy.dev/) backend (sorry CPU gang). Still under construction.
```python
from patrick.nn import NN as nn
from patrick.losses import mse_loss
from patrick.activations import leaky_relu
from patrick.layers import FCLayer as linear
"""
Load and preprocess your data here
"""
class Model(nn):
def __init__(self):
self.layers = [
linear(64,32), ## input size is 64
leaky_relu(),
linear(32, 16),
leaky_relu(),
linear(16,1) ## output size is 1
]
net = Model()
net.fit(
x_train, ## your input features, shape: (num_batches, batch_size, input_size)
y_train, ## your labels, shape: (num_batches, batch_size, output_size)
epochs=60,
learning_rate=0.005,
loss = mse_loss
)
```
"The best way to learn how something works is to make it from scratch"
-Probably Someone