https://github.com/shambac/shamboflow

Fierce tensorflow competitor

https://github.com/shambac/shamboflow

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary

Keywords

cuda cupy machine-learning numpy pypi-package
Last synced: 8 months ago · JSON representation

Repository

Fierce tensorflow competitor

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 4
Topics
cuda cupy machine-learning numpy pypi-package
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

Python PyPI - Version GitHub Actions Workflow Status GitHub Release Date PyPI - Downloads

[!IMPORTANT] This is an elaborate meme I put a lot of effort into. So please, no one sue me.

ShamboFlow is an open source API for creating machine learning models. It is only available in python.

ShamboFlow is super fast drop in replacemnet for TensorFlow (Read adds nothing, not even performance improvement). It is build from scratch (Read, using numpy) and comes with Cuda GPU support out of the box. I will tell the story at the end of this file on how this came to be.

On a serious note, I always wanted to implement a neural network using just numpy and no additional libraries and this gave me an excuse to do so. And so I did. I made this in a week. Learned a lot of stuff in the process and it was a stressfull and fun experience. This library is dependent on numpy as stated but also uses cupy to add GPU support. Other two dependencies are tqdm for progress bar and colorama for colorful texts. I will probably work more on this as I have already put in quite some effort.

Documentation

Static Badge

Static Badge

Install

Install using the pip package. bash $ pip install shamboflow

To update ShamboFlow to the latest version, add --upgrade flag to the above command

Example

A small example program that shows how to create a simple ANN with 3-2-1 topology and train it with data to perform predictions.

Define the model and train it

```python import numpy as np

Dataset

xdata = np.array([[1, 0, 1]]) ydata = np.array([[1]])

Parameters

learningrate = 0.9 trainepochs = 20

Import the library

import shamboflow as sf

Create a model

model = sf.models.Sequential()

Add layers

model.add(sf.layers.Dense(3)) model.add(sf.layers.Dense(2, activation='sigmoid')) model.add(sf.layers.Dense(1, activation='sigmoid'))

Compile the model

model.compile(learningrate=learningrate, loss='meansquarederror', verbose=True)

Callbacks

checkpoint = sf.callbacks.ModelCheckpoint(monitor='loss', savebestonly=True, verbose=True)

Train the model with the dataset

model.fit( xdata, ydata, epochs=train_epochs, callbacks=[checkpoint] )

Save the trained model to disk

model.save('model.meow') ```

Load the saved model and predict

```python import numpy as np import shamboflow as sf

model = sf.models.load_model("./model.meow")

a = np.array([[1, 0, 1]])

res = model.predict(a) print(res) ```

Story

Its storytime.

Last week we had a class on Neural Networks at university. At the end of the class, our professor told us to implement the given network in python. Now, previously he had told us to not use any libraries to perform our tasks as that would just ruin the purpose of learning algorithms. So, I got excited that I am gonna implement a neural network using just python. Then he told us that we can use libraries for making the network. And I was a little bummed. My friend jokingly told me that, "No you have to make it". And I said, if I finish it within a week, will you use it in the assignment. My friends agreed to it.

So, here it is. My library. I am so gonna make them use this for the assignments.

Owner

  • Name: Shamba Chowdhury
  • Login: ShambaC
  • Kind: user
  • Location: Penthouse in Sundarban

Nyanpasu ! I like to read manga and do random stuffs. 😛

GitHub Events

Total
  • Release event: 2
  • Push event: 3
  • Create event: 2
Last Year
  • Release event: 2
  • Push event: 3
  • Create event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 25 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: shamboflow

A fierce Tensorflow competitor

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 25 Last month
Rankings
Dependent packages count: 10.3%
Average: 34.0%
Dependent repos count: 57.8%
Maintainers (1)
Last synced: 9 months ago