Skip to content

Commit 082bddc

Browse files
committed
run Zygote.refresh every 50 distributions
1 parent 1c73f8f commit 082bddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function test_ad(f, at = 0.5; rtol = 1e-8, atol = 1e-8)
181181
elseif stg == "Zygote"
182182
zygote_counter[] += 1
183183
isarr = isa(at, AbstractArray)
184-
if mod(zygote_counter[], 10) == 0
184+
if mod(zygote_counter[], 50) == 0
185185
Zygote.refresh()
186186
end
187187
reverse_zygote = Zygote.gradient(f, at)[1]

0 commit comments

Comments
 (0)