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
FastMoE
Commits
0ac24914
Commit
0ac24914
authored
Aug 18, 2021
by
serendipityCoding
Browse files
fix typo in transformer example
parent
0ec96584
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/transformer-xl/mem_transformer.py
examples/transformer-xl/mem_transformer.py
+1
-1
No files found.
examples/transformer-xl/mem_transformer.py
View file @
0ac24914
...
...
@@ -513,7 +513,7 @@ class AdaptiveEmbedding(nn.Module):
l_idx
,
r_idx
=
self
.
cutoff_ends
[
i
],
self
.
cutoff_ends
[
i
+
1
]
d_emb_i
=
d_embed
//
(
div_val
**
i
)
self
.
emb_layers
.
append
(
nn
.
Embedding
(
r_idx
-
l_idx
,
d_emb_i
))
self
.
emb_projs
.
append
(
Projectio
(
d_proj
,
d_emb_i
))
self
.
emb_projs
.
append
(
Projectio
n
(
d_proj
,
d_emb_i
))
def
forward
(
self
,
inp
):
if
self
.
div_val
==
1
:
...
...
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