Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Fairseq
Commits
fbc42f2d
Commit
fbc42f2d
authored
Jun 14, 2018
by
alexeib
Committed by
Myle Ott
Jun 15, 2018
Browse files
add default architecture for gbw fconv lm
parent
16caed31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
fairseq/models/fconv.py
fairseq/models/fconv.py
+13
-0
No files found.
fairseq/models/fconv.py
View file @
fbc42f2d
...
...
@@ -628,6 +628,19 @@ def fconv_lm_dauphin_wikitext103(args):
args
.
adaptive_softmax_cutoff
=
getattr
(
args
,
'adaptive_softmax_cutoff'
,
'10000,20000,200000'
)
base_lm_architecture
(
args
)
@
register_model_architecture
(
'fconv_lm'
,
'fconv_lm_dauphin_gbw'
)
def
fconv_lm_dauphin_gbw
(
args
):
layers
=
'[(512, 5)]'
layers
+=
' + [(128, 1, 0), (128, 5, 0), (512, 1, 3)] * 3'
layers
+=
' + [(512, 1, 0), (512, 5, 0), (1024, 1, 3)] * 3'
layers
+=
' + [(1024, 1, 0), (1024, 5, 0), (2048, 1, 3)] * 6'
layers
+=
' + [(1024, 1, 0), (1024, 5, 0), (4096, 1, 3)]'
args
.
decoder_embed_dim
=
getattr
(
args
,
'decoder_embed_dim'
,
128
)
args
.
decoder_layers
=
getattr
(
args
,
'decoder_layers'
,
layers
)
args
.
decoder_attention
=
getattr
(
args
,
'decoder_attention'
,
'False'
)
args
.
adaptive_softmax_cutoff
=
getattr
(
args
,
'adaptive_softmax_cutoff'
,
'10000,50000,200000'
)
base_lm_architecture
(
args
)
@
register_model_architecture
(
'fconv'
,
'fconv'
)
def
base_architecture
(
args
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment