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
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
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
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ac9aac554f6bff81d1bc067f4f6fd3c8e710a72c5e9ba661aaaaad0379b9ca
|
|
| MD5 |
4919dcd6bd4dce114f79f1418f7b7795
|
|
| BLAKE2b-256 |
ba2813cf602123681b2f5040de75ce530d3ee390d7a3fb85042effa512380f9e
|
File details
Details for the file moiz_ml_test_othoz-0.0.1-py3-none-any.whl.
File metadata
- Download URL: moiz_ml_test_othoz-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d819ef9f31b2725e36140b635d15f84302e47a20c226e389d94fcc7410cc295
|
|
| MD5 |
815bce79fe4861a0f31595f9a77457b8
|
|
| BLAKE2b-256 |
5ea13ef401b00bbc1b3df7df7f85789297d9fdd83710bfa4195957e1272d7991
|