Commit 3b4e1e2
Test FP16 support when available with Armadillo (#426)
* Add CMake modules to find Bandicoot libraries and includes.
* Add initial GitHub Actions to build against Bandicoot and run the tests.
* 1. Add type proxies to select the right type based on the used backend and datatype.
2. Update IQN optimizer to build against Armadillo and Bandicoot.
3. Update IQN test cases to test against Armadillo and Bandicoot backend.
4. Update logisitic regression function, to support Armadillo and Bandicoot.
* Refactor CNE optimizer and tests cases to work with Armadillo and Bandicoot datatypes.
* Refactor Katyusha optimizer and tests cases to work with Armadillo and Bandicoot datatypes.
* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. AdaBelief
2. AdaBound
3. AMSBound
4. AdaGrad
5. Adam
6. Adamax
7. AMSGrad
8. Nadam
9. Nadamax
10. OptimisticAdam
11. Eve
12. FTML
13. LBFGS
14. Lookahead
15. Padam
16. QHAdam
17. SMORMS3
18. SpaleraSGD
19. SPSA
20. SWATS
21. WNGrad
22. Yogi
23. MomentumSGD
24. NesterovMomentum
25. QuasiHyperbolic
26. SGD
27. SGDR
28. SnapshotSGDR
29. CNE
30. CMAES
31. ActiveCMAES
32. PSO
33. LBestPSO
34. MOEAD
35. AugmentedLagrangian
* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. AdaDelta
2. AdaSqrt
3. BigBatchSGD
4. CoordinateDescent (CD)
5. GradientDescent
6. GridSearch
7. NSGA2
8. ParallelSGD
* Refactor optimizers to work with Armadillo and Bandicoot datatypes:
1. DifferentialEvolution (DE)
2. RMSProp
3. SimulatedAnnealing (SA)
4. SARAH
5. SARAH+
6. SVRG
7. BarzilaiBorweinDecay
8. DemonAdam
9. DemonSGD
* Use inverse transform sampling to replicating arma::randg sampling since randg is not supported in Bandicoot.
* Apply suggestions from code review by @rcurtin.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Group test cases and fix indentations.
* Update optimizer reference styling.
* Add option to build against Bandicoot (by default we build against Bandicoot if found).
* Mention AugLagrangianType constructor in the optimizer documentation, that allows to use a different datatype i.e. arma::fvec or coot::fvec.
* Use data type specific element type for the bounds parameter.
* Make sure we follow the max character line limitation from the style guide.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Remove backports for outdates armadillo versions.
* Indentation fixes.
* Indentation fixes.
* Use the correct data type during testing.
* Do not use the namespace twice.
* Test against CPU/OpenCL/CUDA backend.
* Use the correct test case type.
* We don't need Bandicoot when we test against Armadillo (CPU) backend.
* Use the correct minimal Bandicoot version.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Comment on the added proxies.
* Merge arma and coot traits into a single file.
* Fix deprecation warning from newer Armadillo.
* Fix spacing.
* Add logging output for PSO.
* Adapt problems to be templatized.
* Templatize tests to use ENS_TEST_TYPES.
* Fix name of AdaGrad in the documentation.
* Apply suggestions from code review.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Update about half the optimizers to use FP16.
* Refactor ForwardType into two different structures to avoid std::conditional.
* Minor changes to get tests to pass on the Pi.
* Remove unused proxies.
* Update the other half of the optimizers to use FP16.
* Minor fixes to work on non-emulated FP16.
* Update to arma::hmat and enable sparse types.
* Make CMake standard easily configurable.
* Revert CategoryType to arma::Row<size_t> since that should always stay on the CPU.
* Add convenience IsMatrixType<> struct.
* Catch underflow for RMSprop.
* Revert to norm()-only implementation for gradient norm computation.
* Remove proxies, use using instead.
* Older Armadillo versions don't support changing sparse-to-dense and also element types.
* Remove sort_index() proxy and use using instead.
* Oops, fix compatibility conv_to implementation.
* Fix divide by zero condition.
* Individually accessed vector, so keep vector on the CPU, for faster access.
* Apply suggestions from code review
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Kepp the indicies on the CPU.
* Apply suggestions from code review.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Remove outdated test case.
* Use initialization list for the velocity vector.
* Apply suggestions from code review
Co-authored-by: Ryan Curtin <ryan@ratml.org>
* Readd removed test cases for MOEAD.
* Use sort_index for sorting that is supported for both armadillo and bandicoot.
* Revert changes to Parallel SGD optimizer, no benefit to upload to the GPU.
* Only reset if we haven't reached the end of the iterations.
* Use accu to the the sum of the vector.
* Use clamp instead of min, for a more efficient computation.
* Add missing data type.
* Use ENS_HAVE_COOT instead of USE_COOT and automatically detect when Bandicoot has already been included.
* Fix incorrect initialization list.
* Remove unnecessary GetFillType<MatType>::zeros, which does not work for sparse matrices.
* Clean up the last few proxy functions.
* Refactor problems to avoid adding extra template parameters.
* NSGA2: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.
* MOEAD: introduce a new Optimize function that takes the front and the paretoSet, so we can avoid introducing new template parameters.
* Remove unnecessary lr matrix.
* Minor cleanups for SA.
* Clean up member initialization for PSO.
* Update documentation for multi-objective optimizers.
* Update API for Snapshots().
* Keep the MOEAD front indices on the CPU, to be more efficient.
* Remove class template parameter for the bound parameter, to make the optimizer class easier.
* Use the correct location for the bandicoot wrapper.
* No need to set the backend for testing, we will test whatever was available during compilation.
* Use the correct def to enable the bandicoot backend.
* use the correct name for the def.
* Fixes so that Bandicoot actually gets detected and compiled in correctly.
* Oops, fix merge.
* Add tolerances for Bandicoot matrices.
* Fix missing typedef.
* Fix some failing tests.
* Fix minor compilation issues.
* Fix compilation errors and warnings.
* Minor issues discovered in self-review.
* Oops, fix missing type.
* Reduce batch size to try and prevent NaNs.
---------
Co-authored-by: Marcus Edel <marcus@urgs.org>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>1 parent 8579b39 commit 3b4e1e2
156 files changed
Lines changed: 3423 additions & 2395 deletions
File tree
- doc
- include/ensmallen_bits
- ada_belief
- ada_bound
- ada_delta
- ada_grad
- ada_sqrt
- adam
- agemoea
- aug_lagrangian
- bigbatch_sgd
- cd
- cmaes
- cne
- demon_adam
- demon_sgd
- de
- eve
- ftml
- function
- fw
- gradient_descent
- iqn
- katyusha
- lbfgs
- lookahead
- moead
- weight_init_policies
- nsga2
- padam
- parallel_sgd
- problems
- zdt
- pso
- init_policies
- update_policies
- qhadam
- rmsprop
- sarah
- sa
- sgd/update_policies
- smorms3
- spalera_sgd
- spsa
- svrg
- swats
- utility
- wn_grad
- yogi
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | | - | |
| 1300 | + | |
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| 1332 | + | |
1332 | 1333 | | |
1333 | 1334 | | |
1334 | 1335 | | |
1335 | 1336 | | |
1336 | 1337 | | |
1337 | 1338 | | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1338 | 1346 | | |
1339 | 1347 | | |
1340 | 1348 | | |
| |||
1386 | 1394 | | |
1387 | 1395 | | |
1388 | 1396 | | |
1389 | | - | |
| 1397 | + | |
1390 | 1398 | | |
1391 | 1399 | | |
1392 | 1400 | | |
| |||
1399 | 1407 | | |
1400 | 1408 | | |
1401 | 1409 | | |
| 1410 | + | |
1402 | 1411 | | |
1403 | 1412 | | |
1404 | 1413 | | |
1405 | 1414 | | |
1406 | 1415 | | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
1407 | 1423 | | |
1408 | 1424 | | |
1409 | 1425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
112 | | - | |
113 | | - | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | | - | |
116 | | - | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | | - | |
119 | | - | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | | - | |
123 | | - | |
| 130 | + | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| |||
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
112 | 128 | | |
113 | 129 | | |
114 | 130 | | |
| |||
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
132 | | - | |
| 148 | + | |
133 | 149 | | |
134 | 150 | | |
135 | 151 | | |
136 | 152 | | |
137 | 153 | | |
138 | 154 | | |
139 | | - | |
140 | | - | |
| 155 | + | |
| 156 | + | |
141 | 157 | | |
142 | | - | |
143 | | - | |
| 158 | + | |
| 159 | + | |
144 | 160 | | |
145 | | - | |
146 | | - | |
| 161 | + | |
| 162 | + | |
147 | 163 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
151 | 167 | | |
152 | 168 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
156 | 172 | | |
157 | 173 | | |
158 | 174 | | |
| |||
165 | 181 | | |
166 | 182 | | |
167 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
168 | 191 | | |
169 | 192 | | |
170 | 193 | | |
171 | 194 | | |
172 | | - | |
| 195 | + | |
173 | 196 | | |
174 | 197 | | |
175 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
113 | 129 | | |
114 | 130 | | |
115 | 131 | | |
| |||
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 142 | | |
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
133 | | - | |
| 146 | + | |
134 | 147 | | |
135 | 148 | | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | | - | |
141 | | - | |
| 153 | + | |
| 154 | + | |
142 | 155 | | |
143 | | - | |
144 | | - | |
| 156 | + | |
| 157 | + | |
145 | 158 | | |
146 | | - | |
147 | | - | |
| 159 | + | |
| 160 | + | |
148 | 161 | | |
149 | | - | |
150 | | - | |
151 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
152 | 165 | | |
153 | 166 | | |
154 | 167 | | |
155 | 168 | | |
156 | 169 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 170 | + | |
| 171 | + | |
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
| |||
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | 194 | | |
176 | | - | |
| 195 | + | |
177 | 196 | | |
178 | 197 | | |
179 | 198 | | |
| |||
0 commit comments