Skip to content

aris-gk3/TransferLearningPTQ_Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project README

Workflow

Setup step (change .env paths or set relative dataset path in cloud environment)

  1. Find head structure & data augmentation strategy
  2. Train (unfreeze head and/or last block)
  3. Find ranges of weights, bias & activation (Visualize optionally)
  4. PTQ (3 methods) & Evaluate

To-do

  1. Create hwa_wt_range_search.ipynb

Before Getting Started

  • .env should be added with the following paths in the root directory:
    BASE_PATH, PATH_DATASET, PATH_TEST, PATH_RAWDATA, PATH_JOINEDDATA, PATH_SAVEDMODELS

The folder structure presented below should be followed.

  • This project goes hand to hand with ml_project_util . This package is installed as below.
# In cloud engines/environments
!pip install git+https://github.com/aris-gk3/ml_project_util.git
# In local environments
pip install git+https://github.com/aris-gk3/ml_project_util.git

Workflow for getting started with new project

  1. Dataset & Test Split
    Add images in classes
  2. Apply Transfer Learning to VGG-16
    a. Set new head freeze other layers and train
    b. If needed, unfreeze some more layers & train
  3. Apply PTQ and evaluate
    Code iteratively finds appropriate ranges for quantization. Calculations are made for HW efficient quantization. In this, multiply and add operations for scaling between layers is substituted with bit shifting by adjusting the ranges of each layer.

Dataset & Test Split

In both Tran_val & Test directories, images are contained in 1 subdirectory per class.

Preproccessing

VGG-16 takes as input 224x224x3, where 3 stands for BGR.

Choose appropriate Data Augmentation strategy.

Add example code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published