Skip to content

Tiny neural net library written from scratch with cupy ⚠️ under construction ⚠️

Notifications You must be signed in to change notification settings

Mayukhdeb/patrick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

patrick

Spongebob's best friend

Tiny neural net library written from scratch with cupy backend (sorry CPU gang). Still under construction.

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

About

Tiny neural net library written from scratch with cupy ⚠️ under construction ⚠️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages