fn
random_normal_storage
→Storageint random_normal_storage(const int & shape, double mean, double std, Dtype dt, Device device, Generator & gen)Generate normally distributed samples using the Box-Muller transform.
Parameters
shapeconst Shape&Output shape.
meandoubleMean of the resulting normal distribution.
stddoubleStandard deviation (non-negative).
dtDtypeOutput dtype;
F32 or F64 only.deviceDeviceTarget device.
genGenerator&Random-number generator.
Returns
StorageNew storage of shape shape with i.i.d. \mathcal{N}(\text{mean}, \text{std}^2) samples.