floats

abstract fun floats(shape: Shape): DTensor

Produce a fresh tensor of the given shape filled with uniformly distributed float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given RandomKey instance.


open fun floats(n: Int): DTensor

Produce a fresh vector of the given length filled with random float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given key.