Skip to content

yashrathi-git/miniflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miniflow

Install Miniflow

pip install git+https://github.com/yashrathi-git/miniflow

Example Usage

Create a basic model and train it

from miniflow.core import Model
from miniflow.layers import LayerDense
from miniflow.activations import ActivationReLU, ActivationSoftmax
from miniflow.loss import CategoricalLossEntropy
from miniflow.optimizers import AdamOptimizer
from miniflow.accuracy import AccuracyCategorical

# Create model
model = Model()

# Add layers
model.add(LayerDense(input_features, 64))
model.add(ActivationReLU())
model.add(LayerDense(64, 32))
model.add(ActivationReLU())
model.add(LayerDense(32, output_classes))
model.add(ActivationSoftmax())

# Set loss, optimizer, and accuracy
model.set(
    loss=CategoricalLossEntropy(),
    optimizer=AdamOptimizer(learning_rate=0.001),
    accuracy=AccuracyCategorical()
)

# Finalize the model
model.finalize()

# Train the model
model.train(X_train, y_train, epochs=1000, validation_data=(X_val, y_val))

Deep learning framework from scratch for vanilla neural networks. Made while following along coursera's DL specialisation with help of nnfs source code

About

Minimal Deep Learning framework from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages