use svod_dtype::DType;
use svod_tensor::Tensor;
pub(crate) fn fan_in_uniform(shape: &[usize], fan_in: usize, dtype: DType) -> Tensor {
let bound = (fan_in.max(1) as f64).powf(-0.5);
Tensor::uniform_with_dtype(shape, -bound, bound, dtype).expect("non-empty shape with finite bounds")
}
pub(crate) fn ones(shape: &[usize], dtype: DType) -> Tensor {
Tensor::ones(shape, dtype).expect("non-empty shape")
}
pub(crate) fn zeros(shape: &[usize], dtype: DType) -> Tensor {
Tensor::zeros(shape, dtype).expect("non-empty shape")
}