Random initializers. (#128)

* Random initialization.

* CPU rng generation.
This commit is contained in:
Laurent Mazare
2023-07-10 18:26:21 +01:00
committed by GitHub
parent e2807c78a4
commit f29b77ec19
6 changed files with 235 additions and 3 deletions

View File

@ -38,6 +38,14 @@ impl CudaDevice {
pub(crate) fn cuda_from_cpu_storage(&self, _: &CpuStorage) -> Result<CudaStorage> {
Err(Error::NotCompiledWithCudaSupport)
}
pub(crate) fn rand_uniform(&self, _: &Shape, _: DType) -> Result<CudaStorage> {
Err(Error::NotCompiledWithCudaSupport)
}
pub(crate) fn rand_normal(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result<CudaStorage> {
Err(Error::NotCompiledWithCudaSupport)
}
}
#[derive(Debug)]