move LayerNorm after Relu
This commit is contained in:
parent
e3a8a6b87f
commit
7357c8ed62
1 changed files with 1 additions and 1 deletions
2
main.lua
2
main.lua
|
@ -233,12 +233,12 @@ local function make_network(input_size)
|
||||||
nn_ty:feed(nn_y)
|
nn_ty:feed(nn_y)
|
||||||
|
|
||||||
nn_y = nn_y:feed(nn.Dense(128))
|
nn_y = nn_y:feed(nn.Dense(128))
|
||||||
if cfg.layernorm then nn_y = nn_y:feed(nn.LayerNorm()) end
|
|
||||||
if cfg.deterministic then
|
if cfg.deterministic then
|
||||||
nn_y = nn_y:feed(nn.Relu())
|
nn_y = nn_y:feed(nn.Relu())
|
||||||
else
|
else
|
||||||
nn_y = nn_y:feed(nn.Gelu())
|
nn_y = nn_y:feed(nn.Gelu())
|
||||||
end
|
end
|
||||||
|
if cfg.layernorm then nn_y = nn_y:feed(nn.LayerNorm()) end
|
||||||
|
|
||||||
nn_z = nn_y
|
nn_z = nn_y
|
||||||
nn_z = nn_z:feed(nn.Dense(#gcfg.jp_lut))
|
nn_z = nn_z:feed(nn.Dense(#gcfg.jp_lut))
|
||||||
|
|
Loading…
Reference in a new issue