Skeleton implementation for softmax.

This commit is contained in:
laurent
2023-06-23 22:00:13 +01:00
parent 5d44e76e3f
commit 8443963d4f
5 changed files with 32 additions and 0 deletions

View File

@ -72,6 +72,13 @@ impl Storage {
}
}
pub(crate) fn divide_by_sum_over_dim(&mut self, shape: &Shape, dim: usize) {
match self {
Storage::Cpu(storage) => storage.divide_by_sum_over_dim(shape, dim),
Self::Cuda(storage) => storage.divide_by_sum_over_dim(shape, dim),
}
}
pub(crate) fn to_dtype(&self, shape: &Shape, stride: &[usize], dtype: DType) -> Result<Self> {
match self {
Storage::Cpu(storage) => {