You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request: can the documentation please provide guidance on setting the PRNG seed for consistent tensor initialization?
Running this code produces a different value on every run:
let device = NdArrayDevice::default();
let conv2d = Conv2dConfig::new([1, 1], [1, 1]).init::<NdArray>(&device);
dbg!(conv2d.weight.val().into_data().to_vec::<f32>().unwrap());
In many situations, having a different seed for each run is useful because it allows training from a different initialization. However, it is also frequently useful to fix the seed. For example, in testing scenarios, there are sometimes floating-point comparisons that succeed for particular seeds, but fail in a borderline way for others. To avoid spurious CI failures in such scenarios, fixing the seed to a "known good value for this test run, on my chosen CI backend" is an extremely useful bandaid.
The text was updated successfully, but these errors were encountered:
Request: can the documentation please provide guidance on setting the PRNG seed for consistent tensor initialization?
Running this code produces a different value on every run:
In many situations, having a different seed for each run is useful because it allows training from a different initialization. However, it is also frequently useful to fix the seed. For example, in testing scenarios, there are sometimes floating-point comparisons that succeed for particular seeds, but fail in a borderline way for others. To avoid spurious CI failures in such scenarios, fixing the seed to a "known good value for this test run, on my chosen CI backend" is an extremely useful bandaid.
The text was updated successfully, but these errors were encountered: