Package: ainshamsflow
AinShamsFlow4th CSE Neural Networks Project.Contents:Project DescriptionProject StructureInstallUsageTeam MembersTodoProject Description:AinShamsFlow (asf) is a Deep Learning Framework built by ourTeamfrom Ain Shams University during December 2020 - January 2021.The Design and Interface is inspired heavily from Keras and TensorFlow.However, we only implement everything from scratch using only simple libraries
such as numpy and matplotlib.Project Structure:The Design of all parts can be seen in the following UML Diagram.This is how the Design Structure should work in our Framework.Install:You can install the latest available version as follows:$pipinstallainshamsflowUsage:you start using this project by importing the package as follows:>>>importainshamsflowasasfthen you can start creating a model:>>>model=asf.models.Sequential([...asf.layers.Dense(300,activation="relu"),...asf.layers.Dense(100,activation="relu"),...asf.layers.Dense(10,activation="softmax")...],input_shape=(784,),name="my_model")>>>model.print_summary()then compile and train the model:>>>model.compile(...optimizer=asf.optimizers.SGD(lr=0.01),...loss='sparsecategoricalcrossentropy',...metrics=['accuracy']...)>>>history=model.fit(X_train,y_train,epochs=100)finally you can evaluate, predict and show training statistics:>>>history.show()>>>model.evaluate(X_valid,y_valid)>>>y_pred=model.predict(X_test)A more elaborate example usage can be found inmain.pyor check out thisdemo notebook.Team Members:Pierre NabilAhmed TahaGirgis MichealHazzem MohammedIbrahim ShoukryJohn BahaaMichael MagdyZiad TarekTodo:Framework Design:A Data Module to read and process datasets.Dataset__init__()__bool__()__len__()__iter__()__next__()apply()numpy()batch()cardinality()concatenate()copy()enumerate()filter()map()range()shuffle()skip()split()take()unbatch()add_data()add_targets()normalize()ImageDataGenerator__init__()flow_from_directory()A NN Module to design different architectures.Activation FunctionsLinearSigmoidHard SigmoidTanhHard TanhReLULeakyReLUELUSELUSoftmaxSoftplusSoftsignSwishLayersDNN Layers:DenseBatchNormDropoutCNN Layers 1D: (optional)ConvPool (Avg and Max)GlobalPool (Avg and Max)UpsampleCNN Layers 2D:ConvPool (Avg and Max)FastConvFastPool (Avg and Max)GlobalPool (Avg and Max)UpsampleCNN Layers 3D: (optional)ConvPool (Avg and Max)GlobalPool (Avg and Max)UpsampleOther Extra Functionality:FlattenActivationReshapeInitializersConstantUniformNormalIdentityLossesMSE  (Mean Squared Error)MAE  (Mean Absolute Error)MAPE (Mean Absolute Percentage Error)BinaryCrossentropyCategoricalCrossentropySparseCategoricalCrossentropyHuberLossLogLossLinearActivationLogLossSigmoidActivationPerceptronCriterionLossSvmHingeLossEvaluation MetricsAccuracyTP (True Positives)TN (True Negatives)FP (False Positives)FN (False Negatives)PrecisionRecallF1ScoreRegularizersL1L2L1_L2Optimization Modules for trainingSGDMomentumAdaGradRMSPropAdaDeltaAdamA Visualization Modules to track the training and testing processesHistory Class for showing training statisticsverboseparameter in traininglive plotting of training statisticsA utils module for reading and saving modelsAdding CUDA supportPublish to PyPICreating a Documentation for the ProjectExample Usage:This part can be found in thedemo notebookmentioned above.Download and Split a dataset (MNIST or CIFAR-10) to training, validation and testingConstruct an Architecture (LeNetorAlexNet) and make sure all of its components are
provided in your framework.Train and test the model until a good accuracy is reached (Evaluation Metrics will need to be implemented in the framework also)Save the model into a compressed formatChange Log0.1.0 (29/1/2021)First Release