Skip to content

H-IAAC/SmartHAR

Repository files navigation

SMART-HAR: Strategic Meta-learning with Adaptive Replay and Network Tuning for lifelong learning in HAR

Main files:

File Description
smart_offlin.py RLN training
smart_online.py online learning
run_online.py runs online learning with several RLNs and baselines
run_offline.sh examples of RLNs training with different parametrizations

Main directories

Folder Description
configs experiments' setting classes
datasets classes and functions for dataset preprocessing and benchmark generation
model classes for model setting and meta-learning
utils main experiments' common classes with various purposes

Execution examples

**Meta-training - encoder training - RLN with replay generation and augmentation **

python smart_offline.py --dataset=ucihar --scenario=nic --steps=2000 --plot --reset --replay --replay_strategy "herding,random,exemplar" --new_seed --runs=5 --random --model 'oml' --main_folder 'smart' --network_id 'har_1layer' --augmentation ['Jitter','Scale','Perm','TimeW','MagW']

Online learning

python smart_online.py --path /path to encoder --folder_id smart --plot --reset_weights --name continual --model oml --replay --replay_strategy random --replay_update --encoder_update --encoder_replay --encoder_strategy replay --encoder_classes all --encoder_ML --runs 5

Notes

  • Parametrization available and their descriptions can be found in ../configs/class_parser* files.
  • Examples of sh file to run meta-training in run_offline.sh.
  • Additional scripts for plotting are available to be customized.

References

This project incorporates the following third-party implementations:

  • Meta-Learning Algorithm and experiment class:
    The core meta-learning module in /model/, /oml/ are adapted from khurramjaved96.
    We extended and adapt the original implementation to support HAR data, new :

About

Strategic Meta-learning with Adaptive Replay and Network Tuning for lifelong learning in HAR

Resources

Stars

3 stars

Watchers

8 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors