Skip to main content

Implemented addition of two numbers in a sequence of varying length in keras.

Project description

Please install required libraries mentioned in requirements.txt if needed: "pip install -r requirements.txt"

dataset_generator.py is used to generate train and test data of varying sequence length and places it in /datasets directory. Datasets of varying sequence length can be created by using arguments mentioned under main function in dataset_generator.py

train.py implements Train class that is responsible for training models using data in /datasets directory. Trained models are stored in /trained_models.

Before proceeding with training please make sure that ‘sequence_length’ is set to the right value in settings.py. For example ‘settings.sequence_length’ should be set to 150 when using training and test data with 150 sequence length. Four models have been trained with following sequence lengths’ data. Sequence lengths: [150, 300, 400, 600]. These models can be found in /trained_models directory.

Keras tuner is also implemented which tunes gradient clip values, learning rates and momentum to be used with optimizer. ‘tune_hyper_parameters’ should be set to False in settings.py when training normal models.

After training each model, it is evaluated on test data automatically. Mean loss and rmse are displayed for the test data. Moreover, 20 random examples are picked from test data and their corresponding label, prediction, rmse are printed. Train and validation loss and metrics plots are also saved for each model in the model directory which can be used to see if the model is overfitting or not.

Evaluation results are shown in “evaluation_results.pdf” file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moiz_ml_test_othoz-0.0.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

moiz_ml_test_othoz-0.0.1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file moiz_ml_test_othoz-0.0.1.tar.gz.

File metadata

  • Download URL: moiz_ml_test_othoz-0.0.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for moiz_ml_test_othoz-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d9ac9aac554f6bff81d1bc067f4f6fd3c8e710a72c5e9ba661aaaaad0379b9ca
MD5 4919dcd6bd4dce114f79f1418f7b7795
BLAKE2b-256 ba2813cf602123681b2f5040de75ce530d3ee390d7a3fb85042effa512380f9e

See more details on using hashes here.

File details

Details for the file moiz_ml_test_othoz-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for moiz_ml_test_othoz-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d819ef9f31b2725e36140b635d15f84302e47a20c226e389d94fcc7410cc295
MD5 815bce79fe4861a0f31595f9a77457b8
BLAKE2b-256 5ea13ef401b00bbc1b3df7df7f85789297d9fdd83710bfa4195957e1272d7991

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page