|
Algorithm 1: LAPNet-HAR |
|
Input: Initial network parameters , hyperparameter , replay buffer size/class b
|
|
Data: Training data
|
|
|
// get base data for pretraining
|
|
set of base classes in
|
|
|
//initialize empty prototype memory and replay
|
| buffer
|
| |
|
/* offline pretraining process
|
*/
|
| Update with
|
| Store prototypes for in using
|
| Sample data from and store in for replay |
| |
|
while continually learning do
|
|
|
| UpdatePrototypeMemory(, , ) |
// Figure 2a &
|
| Equation (3)
|
| ;
|
// form combined query set
|
| Incur loss
|
// Equation (5)
|
| Update model with
|
| PrototypeAdaptation(, , , ) |
// Equation (6)
|
| UpdateReplayBuffer(Q, , , b) |
|
end
|