Module numeric::random
[−]
[src]
The random module provides methods of randomizing tensors.
Here is an example:
use numeric::Tensor; use numeric::random::RandomState; // Create a random state with seed 1234 (it has to be mutable) let mut rs = RandomState::new(1234); let t = rs.uniform(0.0, 1.0, &[3, 3]); println!("{}", t); // 0.820987 0.93044 0.507159 // 0.603939 0.31157 0.383515 // 0.702227 0.346673 0.737954 // [Tensor<f64> of shape 3x3]
Structs
RandomState |