Skip to content

Commit

Permalink
Update model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellShibilski-Unkel authored Jun 11, 2024
1 parent dd22273 commit 2249576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def softmax(x, axis=-1):
return ex / tf.reduce_sum(ex, axis=axis, keepdims=True)

def gelu(x):
return 0.5 * x * (1 + np.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 * tf.pow(x, 3))))
return 0.5 * x * (1 + tf.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 * (x ** 3))))

def norm(x, scope, *, axis=-1, epsilon=1e-5):
# --- Normalize to mean = 0, std = 1, then do a diagonal affine transform --- #
Expand Down

0 comments on commit 2249576

Please sign in to comment.