Skip to content

Commit 5b5310b

Browse files
committed
Set fixed rng in init of RQSCouplingBlocks
1 parent 7e43779 commit 5b5310b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rqspline_coupling.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ Construct and instance of `RQSplineCouplingBlock`, while initializing the parame
112112
compute device specified in `compute_unit`. (Defaults to CPU)
113113
"""
114114
function RQSplineCouplingBlock(mask::Vector{Bool}, nn::Chain, compute_unit::AbstractComputeUnit=CPUnit())
115-
rng = Random.default_rng()
115+
# Set fixed rng to be consistent across julia versions, alternative: rng = Random.default_rng()
116+
rng = TaskLocalRNG()
116117
Random.seed!(rng, 0)
117118

118119
lux_compute_unit = compute_unit isa CPUnit ? cpu_device() : gpu_device()

0 commit comments

Comments
 (0)