Skip to content

Commit

Permalink
fix exp
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelDkhn committed Oct 22, 2023
1 parent 05dbea5 commit 62edd56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/operators/nn/functional/softmax.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fn softmaxWide<
impl WDrop: Drop<W>,
impl TFixed: FixedTrait<T, TMAG>,
impl WFixed: FixedTrait<W, WMAG>,
impl TPrint: PrintTrait<T>
impl TPrint: PrintTrait<T>,
impl WPrint: PrintTrait<W>
>(
z: @Tensor<T>, axis: usize
) -> Tensor<T> {
Expand Down
5 changes: 3 additions & 2 deletions src/operators/tensor/math/exp.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ fn exp_upcast<
impl WCopy: Copy<W>,
impl WDrop: Drop<W>,
impl TIntoW: Into<T, W>,
impl TPrint: PrintTrait<T>
impl TPrint: PrintTrait<T>,
impl WPrint: PrintTrait<W>
>(
mut self: Tensor<T>
) -> Tensor<W> {
Expand All @@ -61,7 +62,7 @@ fn exp_upcast<
loop {
match self.data.pop_front() {
Option::Some(item) => {
(*item).print();
(TIntoW::into(*item)).print();

result.append((TIntoW::into(*item)).exp());
},
Expand Down

0 comments on commit 62edd56

Please sign in to comment.