Skip to content

Commit

Permalink
Exchange rng in init of RQSCouplingBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Micki-D committed Feb 28, 2024
1 parent 5b5310b commit 813986a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rqspline_coupling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ Construct and instance of `RQSplineCouplingBlock`, while initializing the parame
compute device specified in `compute_unit`. (Defaults to CPU)
"""
function RQSplineCouplingBlock(mask::Vector{Bool}, nn::Chain, compute_unit::AbstractComputeUnit=CPUnit())
# Set fixed rng to be consistent across julia versions, alternative: rng = Random.default_rng()
rng = TaskLocalRNG()
Random.seed!(rng, 0)
# Set fixed rng to be consistent across julia versions, alternative: rng = Random.default_rng(); Random.seed!(rng,0)
rng = MersenneTwister(1234)

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

Expand Down

0 comments on commit 813986a

Please sign in to comment.