Package: zensols.deeplearn
Deep Zensols Deep Learning FrameworkThis deep learning library was designed to provide consistent and reproducible
results.See thefull documentation.See thepaperFeatures:Easy to configure and framework to allow for programmaticdebuggingof
neural networks.Reproducibilityof resultsAllrandom seed stateis persisted in the trained model files.Persisting of keys and key order across train, validation and test sets.Analysis of results with complete metrics available.Avectorizationframework that allows for pickling tensors.Additionallayers:FullBiLSTM-CRFand stand-aloneCRFimplementation using easy to
configure constituent layers.Easy to configureN[deep convolution layer] with automatic
dimensionality calculation and configurable pooling and batch centering.Convolutional layer factorywith dimensionality calculation.Recurrent layersthat abstracts RNN, GRU and LSTM.Ndeeplinear layers.Each layer's configurable with activation, dropout and batch normalization.Pandasintegration todata load,easily managevectorized features,
andreport results.Multi-process for time consuming CPU featurevectorizationrequiring little
to no coding.Resource and tensor deallocation with memory management.Real-time performanceand loss metrics with plotting while training.Thoroughunit testcoverage.Debugginglayers using easy to configure Python logging module and control
points.Much of the code provides convenience functionality toPyTorch.  However,
there is functionality that could be used for other deep learning APIs.DocumentationSee thefull documentation.ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3installzensols.deeplearnBinaries are also available onpypi.WorkflowThis package provides a workflow for processing features, training and then
testing a model.  A high level outline of this process follows:Container objects are used to represent and access data as features.Instances ofdata pointswrap the container objects.Vectorize the features of each data point in to tensors.Store the vectorized tensor features to disk so they can be retrieved
quickly and frequently.At train time, load the vectorized features in to memory and train.Test the model and store the results to disk.To jump right in, see theexamplessection.  However, it is better
to peruse the in depth explanation with theIris examplecode follows:The initialdata processing, which includes data representation to batch
creation.Creating and configuring themodel.Using afacadeto train, validate and test the model.Analysis ofresults, including training/validation loss graphs and
performance metrics.ExamplesTheIris example(also see theIris example configuration) is the most
basic example of how to use this framework.  This example is detailed in theworkflowdocumentation in detail.There are also examples in the form ofJuypternotebooks as well, which
include the:Iris notebookdata set, which is a small data set of flower dimensions as a
three label classification,MNIST notebookfor the handwritten digit data set,debugging notebook.AttributionThis project, or example code, uses:PyTorchas the underlying framework.Branched code fromTorch CRFfor theCRFclass.pycudafor Python integration withCUDA.scipyfor scientific utility.Pandasfor prediction output.matplotlibfor plotting loss curves.Corpora used include:Iris data setAdult data setMNIST data setTorch CRFTheCRFclass was taken and modified from Kemal Kurniawan'spytorch_crfGitHub repository.  See theREADME.mdmodule documentation for more
information.  This module wasforked pytorch_crfwith modifications.
However, the modifications were not merged and the project appears to be
inactive.Important: This project will change to use it as a dependency pending
merging of the changes needed by this project.  Until then, it will remain as a
separate class in this project, which is easier to maintain as the only
class/code is theCRFclass.Thepytorch_crfrepository uses the same license as this repository, which
theMIT License.  For this reason, there are no software/package tainting
issues.See AlsoThezensols deepnlpproject is a deep learning utility library for natural
language processing that aids in feature engineering and embedding layers that
builds on this project.CitationIf you use this project in your research please use the following BibTeX entry:@inproceedings{landes-etal-2023-deepzensols,title="{D}eep{Z}ensols: A Deep Learning Natural Language Processing Framework for Experimentation and Reproducibility",author="Landes, Paul  andDi Eugenio, Barbara  andCaragea, Cornelia",editor="Tan, Liling  andMilajevs, Dmitrijs  andChauhan, Geeticka  andGwinnup, Jeremy  andRippeth, Elijah",booktitle="Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023)",month=dec,year="2023",address="Singapore, Singapore",publisher="Empirical Methods in Natural Language Processing",url="https://aclanthology.org/2023.nlposs-1.16",pages="141--146"}ChangelogAn extensive changelog is availablehere.CommunityPlease star the project and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2020 - 2023 Paul Landes