|
247 | 247 | ΔVtrunc = ΔV[:, ind] |
248 | 248 | test_rrule( |
249 | 249 | copy_eig_trunc, A, truncalg ⊢ NoTangent(); |
250 | | - output_tangent = (ΔDtrunc, ΔVtrunc, zero(real(T))), |
| 250 | + output_tangent = (ΔDtrunc, ΔVtrunc, [zero(real(T))]), |
251 | 251 | atol = atol, rtol = rtol |
252 | 252 | ) |
253 | 253 | dA1 = MatrixAlgebraKit.eig_pullback!(zero(A), A, (D, V), (ΔDtrunc, ΔVtrunc), ind) |
|
262 | 262 | ΔVtrunc = ΔV[:, ind] |
263 | 263 | test_rrule( |
264 | 264 | copy_eig_trunc, A, truncalg ⊢ NoTangent(); |
265 | | - output_tangent = (ΔDtrunc, ΔVtrunc, zero(real(T))), |
| 265 | + output_tangent = (ΔDtrunc, ΔVtrunc, [zero(real(T))]), |
266 | 266 | atol = atol, rtol = rtol |
267 | 267 | ) |
268 | 268 | dA1 = MatrixAlgebraKit.eig_pullback!(zero(A), A, (D, V), (ΔDtrunc, ΔVtrunc), ind) |
|
328 | 328 | ΔVtrunc = ΔV[:, ind] |
329 | 329 | test_rrule( |
330 | 330 | copy_eigh_trunc, A, truncalg ⊢ NoTangent(); |
331 | | - output_tangent = (ΔDtrunc, ΔVtrunc, zero(real(T))), |
| 331 | + output_tangent = (ΔDtrunc, ΔVtrunc, [zero(real(T))]), |
332 | 332 | atol = atol, rtol = rtol |
333 | 333 | ) |
334 | 334 | dA1 = MatrixAlgebraKit.eigh_pullback!(zero(A), A, (D, V), (ΔDtrunc, ΔVtrunc), ind) |
|
343 | 343 | ΔVtrunc = ΔV[:, ind] |
344 | 344 | test_rrule( |
345 | 345 | copy_eigh_trunc, A, truncalg ⊢ NoTangent(); |
346 | | - output_tangent = (ΔDtrunc, ΔVtrunc, zero(real(T))), |
| 346 | + output_tangent = (ΔDtrunc, ΔVtrunc, [zero(real(T))]), |
347 | 347 | atol = atol, rtol = rtol |
348 | 348 | ) |
349 | 349 | dA1 = MatrixAlgebraKit.eigh_pullback!(zero(A), A, (D, V), (ΔDtrunc, ΔVtrunc), ind) |
|
380 | 380 | test_rrule( |
381 | 381 | config, eigh_trunc2, A; |
382 | 382 | fkwargs = (; trunc = trunc), |
383 | | - output_tangent = (ΔD[ind, ind], ΔV[:, ind], zero(real(T))), |
| 383 | + output_tangent = (ΔD[ind, ind], ΔV[:, ind], [zero(real(T))]), |
384 | 384 | atol = atol, rtol = rtol, rrule_f = rrule_via_ad, check_inferred = false |
385 | 385 | ) |
386 | 386 | end |
|
389 | 389 | test_rrule( |
390 | 390 | config, eigh_trunc2, A; |
391 | 391 | fkwargs = (; trunc = trunc), |
392 | | - output_tangent = (ΔD[ind, ind], ΔV[:, ind], zero(real(T))), |
| 392 | + output_tangent = (ΔD[ind, ind], ΔV[:, ind], [zero(real(T))]), |
393 | 393 | atol = atol, rtol = rtol, rrule_f = rrule_via_ad, check_inferred = false |
394 | 394 | ) |
395 | 395 | end |
|
431 | 431 | ΔVᴴtrunc = ΔVᴴ[ind, :] |
432 | 432 | test_rrule( |
433 | 433 | copy_svd_trunc, A, truncalg ⊢ NoTangent(); |
434 | | - output_tangent = (ΔUtrunc, ΔStrunc, ΔVᴴtrunc, zero(real(T))), |
| 434 | + output_tangent = (ΔUtrunc, ΔStrunc, ΔVᴴtrunc, [zero(real(T))]), |
435 | 435 | atol = atol, rtol = rtol |
436 | 436 | ) |
437 | 437 | dA1 = MatrixAlgebraKit.svd_pullback!(zero(A), A, (U, S, Vᴴ), (ΔUtrunc, ΔStrunc, ΔVᴴtrunc), ind) |
|
448 | 448 | ΔVᴴtrunc = ΔVᴴ[ind, :] |
449 | 449 | test_rrule( |
450 | 450 | copy_svd_trunc, A, truncalg ⊢ NoTangent(); |
451 | | - output_tangent = (ΔUtrunc, ΔStrunc, ΔVᴴtrunc, zero(real(T))), |
| 451 | + output_tangent = (ΔUtrunc, ΔStrunc, ΔVᴴtrunc, [zero(real(T))]), |
452 | 452 | atol = atol, rtol = rtol |
453 | 453 | ) |
454 | 454 | dA1 = MatrixAlgebraKit.svd_pullback!(zero(A), A, (U, S, Vᴴ), (ΔUtrunc, ΔStrunc, ΔVᴴtrunc), ind) |
|
477 | 477 | test_rrule( |
478 | 478 | config, svd_trunc, A; |
479 | 479 | fkwargs = (; trunc = trunc), |
480 | | - output_tangent = (ΔU[:, ind], ΔS[ind, ind], ΔVᴴ[ind, :], zero(real(T))), |
| 480 | + output_tangent = (ΔU[:, ind], ΔS[ind, ind], ΔVᴴ[ind, :], [zero(real(T))]), |
481 | 481 | atol = atol, rtol = rtol, rrule_f = rrule_via_ad, check_inferred = false |
482 | 482 | ) |
483 | 483 | end |
|
486 | 486 | test_rrule( |
487 | 487 | config, svd_trunc, A; |
488 | 488 | fkwargs = (; trunc = trunc), |
489 | | - output_tangent = (ΔU[:, ind], ΔS[ind, ind], ΔVᴴ[ind, :], zero(real(T))), |
| 489 | + output_tangent = (ΔU[:, ind], ΔS[ind, ind], ΔVᴴ[ind, :], [zero(real(T))]), |
490 | 490 | atol = atol, rtol = rtol, rrule_f = rrule_via_ad, check_inferred = false |
491 | 491 | ) |
492 | 492 | end |
|
0 commit comments