Koios is a Python Neural Network Fremework built using NumPy that allows you to create, customize, and train neural network models for image analysis. Currently, categorical and regression analysis is supported. This framework provides flexibility and ease of use for both beginners and experienced deep learning practitioners interested in building on a streamlined paradigm.
You can install Koios by cloning the GitHub repository:
git clone https://github.com/solomonbaez/koios-framework
Koios is designed to be modular, with a common Model class as the organizational center. To get started, import the necessary components of the framework:
from model import Model
from layers import InputLayer, DeepLayer
from activators import ReLU, Sigmoid
from optimizers import OptimizerAdaM
from loss import *
from accuracy import *
You can use a wide variety of test libraries to initalize datasets, in this example Keras MNIST data is utilized:
from keras.datasets import mnist
(X, y), (X_valid, y_valid) = mnist.load_data()
Next, instantiate and configure your neural network model. Here's an example:
# Instantiate the model
model = Model()
# Add layers
model.add(InputLayer(2))
model.add(DeepLayer(64, activation=ReLU(), l2_w=5e-4, l2_b=5e-4))
model.add(DeepLayer(1, activation=Sigmoid()))
# Set loss, optimizer, and accuracy objects
model.set(
loss=BinaryCrossEntropy(),
optimizer=OptimizerAdaM(decay=5e-7),
accuracy=BinaryAccuracy()
)
model.finalize()
You can train the model with your dataset using the train method:
model.train(X, y, validation=(X_test, y_test), epochs=10000, report=100)
This code trains the model on your dataset for a specified number of epochs, reporting progress every 100 epochs.
- Adjust convolutions.ConvLayer to utilize NumPy tensor operations in place of naive for loops.
- Finalize and integrate convolutions module contents into their intended modules (e.g. ConvLayer into the layers module).
- Create test suite.
- Register Koios on PyPI.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository on GitHub.
- Clone your forked repository to your local machine.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork on GitHub.
- Open a pull request to the main repository.
This project is licensed under the MIT License - see the LICENSE file for details.