OneFlow
It is a Package having the Implementation of ANN with callbacks
🔗 Project Link
Check out the Pypi Package here
Run Locally
Create two files in your working directory:
- config.yaml
- training.py
config.yaml
params:
epochs : 3
batch_size : 32
num_classes : 10
input_shape : [28, 28]
loss_function : sparse_categorical_crossentropy
metrics : accuracy
optimizer : SGD
validation_datasize : 5000
es_patience : 5
artifacts:
artifacts_dir : artifacts
model_dir : model
plots_dir : plots
model_name : model.h5
plot_name : results_plot.png
model_ckpt_dir : ModelCheckpoints
callbacked_model_name : model_ckpt.h5
logs:
logs_dir : logs_dir
general_logs : general_logs
tensorboard_root_log_dir : tensorboard_logs
training.py
from OneFlow.utils.common import read_config
from OneFlow.utils.data_mgmt import get_data
from OneFlow.utils.model import StepFlow
import argparse, os
def training(config_path):
config = read_config(config_path)
validation_datasize = config["params"]["validation_datasize"]
#This "get_data" function is loading the mnist dataset, bring your own and divide into categories to perform the custom training
(X_train, y_train), (X_valid, y_valid), (X_test, y_test) = get_data(validation_datasize)
sp = StepFlow(config, X_train, y_train, X_valid, y_valid)
sp.create_model()
sp.fit_model()
sp.save_final_model()
sp.save_plot()
if __name__ == "__main__":
args = argparse.ArgumentParser()
args.add_argument("-c", "--config", default="config.yaml")
parsed_args = args.parse_args()
training(config_path = parsed_args.config)
Then run the following commands on the termial
pip install OneFlow-Hassi34
python training.py
On completion of training, run the following command on termial and observe the metrics on tensorboard
tensorboard --logdir=logs_dir/tensorboard_logs/
Metadata
Release files for OneFlow-Hassi34 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| OneFlow-Hassi34-0.0.7.tar.gz | 17.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| OneFlow_Hassi34-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.5 kB
Release files / OneFlow-Hassi34-0.0.7.tar.gz
| Download URL | OneFlow-Hassi34-0.0.7.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ab23a5af6277fa1c9b9ce269e7e55e165d547dcccdcb8d060aff51ec7697db1
|
|
BLAKE2b-256 checksum How to use checksums |
32b0e0985fb65ed679bc76295f59986f67c2a97f12ba4e7ed922301349430805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / OneFlow_Hassi34-0.0.7-py3-none-any.whl
| Download URL | OneFlow_Hassi34-0.0.7-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de66b703c227f225f4fe3f58e2fe39af200950dff7030bbedc3937c37b06e48d
|
|
BLAKE2b-256 checksum How to use checksums |
cf16c876ccecbd3fb0de314e83fc3e2bb09bbde83fa961247ee9603c771a4d2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for OneFlow-Hassi34 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.