Skip to content

Commit 9190f09

Browse files
committed
switch residuals to empty lists for memory
1 parent 7e74a0d commit 9190f09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

s2fft/transforms/spherical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def flm_to_ftm(flm, s, precomps):
272272
)
273273

274274
def f_fwd(flm, s, precomps):
275-
return flm_to_ftm(flm, s, precomps), (jnp.zeros_like(flm), s, [])
275+
return flm_to_ftm(flm, s, precomps), ([], s, [])
276276

277277
def f_bwd(res, gtm):
278278
s = res[1]
@@ -620,7 +620,7 @@ def ftm_to_flm(ftm, s, precomps):
620620
return flm
621621

622622
def f_fwd(ftm, s, precomps):
623-
return ftm_to_flm(ftm, s, precomps), (jnp.zeros_like(ftm), s, [])
623+
return ftm_to_flm(ftm, s, precomps), ([], s, [])
624624

625625
def f_bwd(res, glm):
626626
s = res[1]

0 commit comments

Comments
 (0)