simflow
Project description
SimFlow
Ultra portable Deep Learning framework in Numpy
Link to official Documentation : https://00arun00.github.io/SimFlow/
Currently supported features
Layers:
Actication Functions:
- ReLU
- Sigmoid
- Tanh
- LeakyReLU
- Softplus
- exp
Convolutional Layers:
- Convolutional Neural nets
- Dilated Convolutional Layer
Other Layers:
- Dense
- BN_mean (mean only batch norm)
- Batch Normalization
Losses:
- SoftmaxCrossEntropyLoss
Optimizers:
- SGD
- Momentum
- Nestrov Momentum
- RMSProp
- Adagrad
- Adadelta
- Adam
Iterators:
- Full batch
- Mini batch
- Stochastic
Data Loaders:
- MNIST
Installation steps
pip install -r requirements.txt
Sample network/ How to use
import simflow as sf
Data,Labels = sf.data_loader_mnist.load_normalized_mnist_data_flat()
inp_dim = 784
num_classes = 10
#create network
net = sf.Model()
net.add_layer(sf.layers.Dense(inp_dim,200))
net.add_layer(sf.layers.ReLU())
net.add_layer(sf.layers.BN_mean(200))
net.add_layer(sf.layers.Dense(200,num_classes))
#add loss function
net.set_loss_fn(sf.losses.SoftmaxCrossEntropyLoss())
# add optimizer
net.set_optimizer(sf.optimizers.SGD(lr=0.01,momentum=0.9,nestrov=True))
# add iterator
net.set_iterator(sf.iterators.minibatch_iterator())
# fit the training data for 5 epochs
net.fit(Data['train'],Labels['train'],epochs=5)
# pring scores after training
print("Final Accuracies after training :")
print("Train Accuracy: ",net.score(Data['train'],Labels['train'])[1],end=" ")
print("validation Accuracy: ",net.score(Data['val'],Labels['val'])[1],end =' ')
print("Test Accuracy: ",net.score(Data['test'],Labels['test'])[1])
Features currently worked on
Layers:
- dropout
- maxpool / average pool
- PReLU
Regularizers:
- L1
- L2
- elastic net
Optimizers
- Nadam
- Adamax
Testing Features
run the following command to check if all your layers are functional
python -m pytest -v
currently supports
- Dense Layer
- BN_mean Layer
- BN layer
- Conv Layer
- dilatedConv Layer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simflow-0.0.1.tar.gz
(20.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
simflow-0.0.1-py3-none-any.whl
(21.4 kB
view details)
File details
Details for the file simflow-0.0.1.tar.gz.
File metadata
- Download URL: simflow-0.0.1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ff686127dffb8fc98595c51a50f51ffb52771b75aba7d73e97efa76c0ec288
|
|
| MD5 |
b9f51bc888e99800726bc02f0bef0231
|
|
| BLAKE2b-256 |
295353547e0a262deaeb3660b215d9015149788e6f35397153f6e18381d8537b
|
File details
Details for the file simflow-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simflow-0.0.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad0b1c3a94ec4bc2567bb3a0a2daa16e3e73456e4fcb133eaeb2be2ee9019ca
|
|
| MD5 |
461ce3e43ca9476ee0ad3e216df821cc
|
|
| BLAKE2b-256 |
c5feef2a2fe2b7e8aa222c8c2192652d6b9b7d3ead4ed2ab45d9654f931aa990
|