Skip to content

Commit 2346a65

Browse files
fix silu commet
1 parent 3166e0f commit 2346a65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
请在`src/operators.rs`中实现SiLU算子,其公式为:
2323

2424
$$
25-
y=silu(y) × x
25+
y=silu(x) × y
2626
$$
2727

2828
其中

src/operators.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn rms_norm(y: &mut Tensor<f32>, x: &Tensor<f32>, w: &Tensor<f32>, epsilon:
7474
todo!("实现 rms_norm,计算前做一些必要的检查会帮助你后续调试")
7575
}
7676

77-
// y = sigmoid(y) * y * x
77+
// y = sigmoid(x) * x * y
7878
// hint: this is an element-wise operation
7979
pub fn silu(y: &mut Tensor<f32>, x: &Tensor<f32>) {
8080
// let len = y.size();

0 commit comments

Comments
 (0)