Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Scheem

Scheem is a lightweight, from-scratch neural network framework built entirely in Python from scratch (use numpy for fast calculation)

Quick Start

Here is how to use Scheem to solve the classic non-linear XOR Problem.

fromscheemimportScheemX= [
[0, 0],
[0, 1],
[1, 0],
[1, 1]
]
Y= [
[0],
[1],
[1],
[0]
]
# Supported Activation Functions: sigmoid, relu, softmaxactivation= ["sigmoid", "sigmoid"]
# Architecture: 2 inputs, 2 hidden neurons, 1 outputmodel=Scheem([2, 2, 1], activation, X, Y)
model.train(iters=10000, lr=1.0, log_after=1000)
# Iteration: 0 | Cost: 0.68658831# Iteration: 1000 | Cost: 0.01567361# Iteration: 2000 | Cost: 0.00599156# Iteration: 3000 | Cost: 0.00367255# Iteration: 4000 | Cost: 0.00264094# Iteration: 5000 | Cost: 0.00205936# Iteration: 6000 | Cost: 0.00168660# Iteration: 7000 | Cost: 0.00142752# Iteration: 8000 | Cost: 0.00123710# Iteration: 9000 | Cost: 0.00109129model.accuracy(X, Y) # generally X_test and Y_test # np.float64(1.0)model.predict([0, 0])
# array([[0.00090511]])

Future Work

  • Build the Core Layers in Rust or C++ for Performance
  • Build in Numpy for simplicity and performance

References:

About

Scheem is a lightweight, from-scratch neural network framework built entirely in Python (and rust)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages