LaMAML
LaMAML
Bases: PytorchBaseAlgorithm
Look-Ahead Model Agnostic Meta Learning implementation in PyTorch.
LaMAML is not yet implemented in JAX.
References
[1] Gupta, G., Yadav, K. & Paull, L. Look-ahead meta learning for continual learning. in Advances in neural information processing systems 202.
Source code in sequel/algos/pytorch/lamaml.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
__init__(mem_size, glances=5, n_inner_updates=5, second_order=False, grad_clip_norm=2.0, learn_lr=True, lr_alpha=0.3, sync_update=False, initial_alpha_value=0.15, lr_weights=0.1, *args, **kwargs)
Inits the LaMAML algorithm class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mem_size |
int
|
The size of the memory. |
required |
glances |
int
|
The number of gradient steps performed on the current batch. Defaults to 5. |
5
|
n_inner_updates |
int
|
The number of updates performed for the inner step of the Meta Learning
process. The batch is split into |
5
|
second_order |
bool
|
Boolean denoting whether the computational graph is kept for second-order derivative calculations. Defaults to False. |
False
|
grad_clip_norm |
float
|
The max norm of the gradients. Defaults to 2.0. |
2.0
|
learn_lr |
bool
|
Boolean denoting whether the per-parameter learning rate is learned or not. Defaults to True. |
True
|
lr_alpha |
float
|
The learning rate for the parameters corresponding to the learnt learning rate for the weights. Defaults to 0.3. |
0.3
|
sync_update |
bool
|
description. Defaults to False. |
False
|
initial_alpha_value |
float
|
The initial value for the per-parameter learning rate. Defaults to 0.15. |
0.15
|
lr_weights |
float
|
The learning rate for the weights. Applies onl if |
0.1
|
Source code in sequel/algos/pytorch/lamaml.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|