Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyuye committed Jul 30, 2020
1 parent 9a7c343 commit 9e1ffde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gluonnlp/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def __init__(self, mode='erf'):

def hybrid_forward(self, F, x):
if self._mode == 'erf':
# TODO Investigate the precision of F.npx.leaky_relu(x, act_type='gelu')
return x * 0.5 * (1.0 + F.npx.erf(x / math.sqrt(2.0)))
elif self._mode == 'tanh':
return 0.5 * x\
Expand Down

0 comments on commit 9e1ffde

Please sign in to comment.