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
4b650671
Commit
4b650671
authored
Feb 02, 2021
by
Rick Ho
Browse files
fix bmm out shape
parent
dc3db673
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fmoe/layers.py
fmoe/layers.py
+1
-1
No files found.
fmoe/layers.py
View file @
4b650671
...
...
@@ -131,7 +131,7 @@ class FMoETransformerMLP(nn.Module):
core_out
=
x
.
view
(
-
1
,
self
.
top_k
,
self
.
d_model
)
# to: (BxL) x 1 x d_model
core_out
=
torch
.
bmm
(
gate_score
,
core_out
)
output
=
core_out
+
residual
output
=
core_out
.
reshape
(
residual
.
shape
)
+
residual
if
not
self
.
pre_lnorm
:
output
=
self
.
layer_norm
(
output
)
...
...
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