rng_from_array

function defined in module Flux


			rng_from_array([x])

Create an instance of the RNG most appropriate for x. The current defaults are:

  • x isa CuArray: CUDA.default_rng(), else:

  • x isa AbstractArray, or no x provided:

    • Julia version is < 1.7: Random.GLOBAL_RNG

    • Julia version is >= 1.7: Random.default_rng()

Methods

There are 3 methods for Flux.rng_from_array:

deprecated.jl:70