fn
random_uniform_storage
→Storageint random_uniform_storage(const int & shape, double lo, double hi, Dtype dt, Device device, Generator & gen)Generate uniform random samples in the half-open interval [lo, hi).
Samples are produced on the CPU using gen and transferred to
device to make the stream deterministic and reproducible.
Parameters
shapeconst Shape&Output shape.
lo, hidoubleHalf-open interval bounds.
dtDtypeOutput dtype;
F32 or F64 only.deviceDeviceTarget device.
genGenerator&Random-number generator.
Returns
StorageNew storage of shape shape with uniform samples.