mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 21:57:15 +03:00
Restore LayerNorm for mish
This commit is contained in:
parent
134056684f
commit
7d81d17ce5
|
@ -382,13 +382,15 @@ def CNN(width, depth, pieces, nW=1):
|
|||
if pieces == 1:
|
||||
layer = chain(
|
||||
ExtractWindow(nW=nW),
|
||||
LN(Mish(width, width * (nW*2+1)))
|
||||
Mish(width, width*(nW*2+1)),
|
||||
LN(nO=width)
|
||||
)
|
||||
return clone(Residual(layer), depth)
|
||||
else:
|
||||
layer = chain(
|
||||
ExtractWindow(nW=nW),
|
||||
LN(Maxout(width, width * (nW*2+1), pieces=pieces)))
|
||||
return clone(Residual(layer), depth)
|
||||
return clone(Residual(layer), depth)
|
||||
|
||||
|
||||
def SelfAttention(width, depth, pieces):
|
||||
|
|
Loading…
Reference in New Issue
Block a user