mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 03:54:56 +00:00
Skeleton implementation for softmax.
This commit is contained in:
@ -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) => {
|
||||
|
Reference in New Issue
Block a user