We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c80e598 commit 8073dcbCopy full SHA for 8073dcb
keras_rs/src/layers/hstu_compute_output.py
@@ -31,9 +31,7 @@ def keras_norm_mul_dropout(
31
raise NotImplementedError("Group Norm path not suitable for simple Keras ops conversion.")
32
else:
33
# Functional Layer Normalization (Simulated keras_layer_norm)
34
- mean = ops.mean(x, axis=-1, keepdims=True)
35
- variance = ops.mean(ops.square(x - mean), axis=-1, keepdims=True)
36
- x_norm = (x - mean) / ops.sqrt(variance + eps)
+ x_norm = ops.layer_norm(x, axis=-1, epsilon=eps)
37
38
# Apply weight and bias (Gamma * x_norm + Beta)
39
y_norm = x_norm * weight + bias
0 commit comments