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
7a36da42
Commit
7a36da42
authored
May 30, 2018
by
Angela Fan
Committed by
Myle Ott
Jun 15, 2018
Browse files
modified writing prompts model parameters to make readme cleaner
parent
b59815bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
fairseq/models/fconv_self_att.py
fairseq/models/fconv_self_att.py
+11
-3
No files found.
fairseq/models/fconv_self_att.py
View file @
7a36da42
...
...
@@ -494,9 +494,17 @@ def base_architecture(args):
@
register_model_architecture
(
'fconv_self_att'
,
'fconv_self_att_wp'
)
def
fconv_self_att_wp
(
args
):
base_architecture
(
args
)
args
.
encoder_embed_dim
=
getattr
(
args
,
'encoder_embed_dim'
,
512
)
args
.
encoder_embed_dim
=
getattr
(
args
,
'encoder_embed_dim'
,
256
)
args
.
encoder_layers
=
getattr
(
args
,
'encoder_layers'
,
'[(128, 3)] * 2 + [(512,3)] * 1'
)
args
.
decoder_embed_dim
=
getattr
(
args
,
'decoder_embed_dim'
,
512
)
args
.
decoder_layers
=
getattr
(
args
,
'decoder_layers'
,
'[(512, 4)] * 4 + [(768, 4)] * 2 + [(1024, 4)] *
1 + [(2048,4)] *
1'
)
args
.
decoder_embed_dim
=
getattr
(
args
,
'decoder_embed_dim'
,
256
)
args
.
decoder_layers
=
getattr
(
args
,
'decoder_layers'
,
'[(512, 4)] * 4 + [(768, 4)] * 2 + [(1024, 4)] * 1'
)
args
.
decoder_out_embed_dim
=
getattr
(
args
,
'decoder_out_embed_dim'
,
256
)
args
.
decoder_attention
=
getattr
(
args
,
'decoder_attention'
,
'True'
)
args
.
multihead_attention_nheads
=
getattr
(
args
,
'multihead_attention_nheads'
,
1
)
args
.
encoder_attention
=
getattr
(
args
,
'encoder_attention'
,
'False'
)
args
.
encoder_attention_nheads
=
getattr
(
args
,
'encoder_attention_nheads'
,
1
)
args
.
self_attention
=
getattr
(
args
,
'self_attention'
,
'True'
)
args
.
gated_attention
=
getattr
(
args
,
'gated_attention'
,
'True'
)
args
.
downsample
=
getattr
(
args
,
'downsample'
,
'True'
)
args
.
project_input
=
getattr
(
args
,
'project_input'
,
'True'
)
args
.
multihead_self_attention_nheads
=
getattr
(
args
,
'multihead_self_attention_nheads'
,
4
)
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