Skip to content

For implementing 3 normalization techniques - BN, LN and GN

Notifications You must be signed in to change notification settings

pankaja0285/era_v1_session8_pankaja

Repository files navigation

Purpose: Apply 3 different Normalization methods.

Based on CiFAR 10 dataset

Create 3 different models, one for each Normalization methods:-

  • Batch Normalization
  • Group Normalization
  • Linear Normalization

Project Setup:

Clone the project as shown below:-

$ git clone [email protected]:pankaja0285/era_v1_session8_pankaja.git
$ cd era_v1_session8_pankaja

About the file structure
|__config __config.yaml
|__data |__data_analysis |__data_loader __load_data.py
__albumentation.py
|__models __model.py
|__utils __dataset.py<br/ __engine.py
__helper.py
__plot_metrics.py
__test.py
__train.py
|__CiFAR_S8_bn.ipynb
|__CiFAR_S8_gn.ipynb
|__CiFAR_S8_ln.ipynb
|__README.md

NOTE: List of libraries required: torch and torchsummary, tqdm for progress bar, which are installed using requirements.txt

One of 2 ways to run any of the notebooks, for instance CiFAR_S8_bn.ipynb notebook:

  1. Using Anaconda prompt - Run as an administrator start jupyter notebook from the folder era_v1_session8_pankaja and run it off of your localhost
    NOTE: Without Admin privileges, the installs will not be correct and further import libraries will fail.
jupyter notebook
  1. Upload the notebook folder era_v1_session8_pankaja to google colab at colab.google.com and run it on colab

Batch Normalization:

File used: models/model.py, model with Net1 Class and CiFAR_S8_bn.ipynb

Target: - create a model with Batch Normalization as the normalization method

Results:

  • Total parameters: 52,576
  • Train accuracy of 77.69 and test accuracy of 83.75

Analysis:

  • To see how the accuracy is using Batch Normalization method.

Group Normalization:

File used: models/model.py, model with Net2 Class and CiFAR_S8_gn.ipynb

Target: - create a model with Group Normalization as the normalization method

Results:

  • Total parameters: 52,576
  • Train accuracy of 75.39 and test accuracy of 82.24

Analysis:

  • To see how the accuracy is using Group Normalization method.

Linear Normalization:

File used: models/model.py, model with Net3 Class and CiFAR_S8_ln.ipynb

Target: - create a model with Linear Normalization as the normalization method

Results:

  • Total parameters: 52,576
  • Train accuracy of 75.20 and test accuracy of 81.57

Analysis:

  • To see how the accuracy is using Linear Normalization method.

Contributing:

For any questions, bug(even typos) and/or features requests do not hesitate to contact me or open an issue!

About

For implementing 3 normalization techniques - BN, LN and GN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published