Commit 7affaf3
Add KernelLinearOperator, deprecate KeOpsLinearOperator (#62)
* Add KernelLinearOperator, deprecate KeOpsLinearOperator
KeOpsLinearOperator does not correctly backpropagate gradients if the
covar_func closes over parameters.
KernelLinearOperator corrects for this, and is set up to replace
LazyEvaluatedKernelTensor in GPyTorch down the line.
* Fix KeOpsLinearOperator deprecation
* Allow for kernels with reduced batches and multiple outputs per input
* LinearOperator kwargs can be differentiated through
Previously, only positional args were added to the LinearOperator
representation, and so only positional args would receive gradients from
_bilinear_derivative.
This commit also adds Tensor/LinearOperator kwargs to the
representation, and so kwarg Tensor/LinearOperators will also receive
gradients.
* Hyperparameters for KernelLinearOperator must be kwargs
* LO._bilinear_derivative only computes derivatives for args that require gradients
* Expand upon closure variables warning for KernelLinearOperator
* LO._bilinear_derivative exits early if no parameters require gradients
* Refactor KernelLinearOperator._getitem
* Allow for optional number of nonbatch parameter dimensions
* Fix LO._bilinear_derivative
* Update linear_operator/operators/_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/linear_operator_representation_tree.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Update linear_operator/operators/kernel_linear_operator.py
Co-authored-by: Max Balandat <[email protected]>
* Fix errors, address comments
* KroneckerProductLinearOperator broadcasts
* Test cases and fixes for multitask KernelLinearOperator
---------
Co-authored-by: Max Balandat <[email protected]>1 parent f020146 commit 7affaf3
File tree
10 files changed
+699
-35
lines changed- docs/source
- linear_operator
- operators
- test
- test/operators
10 files changed
+699
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
126 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
157 | | - | |
| 169 | + | |
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
| |||
166 | 178 | | |
167 | 179 | | |
168 | 180 | | |
169 | | - | |
| 181 | + | |
170 | 182 | | |
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
174 | | - | |
175 | | - | |
| 186 | + | |
| 187 | + | |
176 | 188 | | |
177 | 189 | | |
178 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
| |||
350 | 359 | | |
351 | 360 | | |
352 | 361 | | |
353 | | - | |
354 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
355 | 370 | | |
356 | | - | |
357 | | - | |
358 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
359 | 374 | | |
360 | | - | |
| 375 | + | |
361 | 376 | | |
362 | | - | |
363 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
364 | 380 | | |
365 | 381 | | |
366 | 382 | | |
| |||
457 | 473 | | |
458 | 474 | | |
459 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
460 | 480 | | |
461 | 481 | | |
462 | 482 | | |
| |||
1344 | 1364 | | |
1345 | 1365 | | |
1346 | 1366 | | |
1347 | | - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1348 | 1372 | | |
1349 | 1373 | | |
1350 | 1374 | | |
| |||
2013 | 2037 | | |
2014 | 2038 | | |
2015 | 2039 | | |
2016 | | - | |
| 2040 | + | |
2017 | 2041 | | |
2018 | 2042 | | |
2019 | 2043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
0 commit comments