Commit 62f82ed
authored
add step_limit to dynamicqueryattention (#159)
This just adds a way to have a given attention mechanism stop before it
has completed all steps.
This makes sense because even though an attention mechanism is trained
for n steps we may not always need to go the whole n steps.
I'm using this right now to train it for classification on the average
of all steps. I think it should make it to shimmer since we'll probably
use this functionality quite a lot.1 parent ca2ab8c commit 62f82ed
1 file changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
231 | 245 | | |
232 | 246 | | |
233 | 247 | | |
| |||
289 | 303 | | |
290 | 304 | | |
291 | 305 | | |
292 | | - | |
| 306 | + | |
293 | 307 | | |
294 | 308 | | |
295 | 309 | | |
| |||
0 commit comments