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
fe5a9cda
Commit
fe5a9cda
authored
Oct 26, 2021
by
Rick Ho
Browse files
fmoe python class update to support comm group in gate
parent
8052b3c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
fmoe/layers.py
fmoe/layers.py
+3
-0
No files found.
fmoe/layers.py
View file @
fe5a9cda
...
...
@@ -128,6 +128,9 @@ class FMoE(nn.Module):
self
.
mask_dict
=
mask_dict
self
.
moe_group
=
moe_group
if
hasattr
(
self
.
gate
,
'requires_moe_group'
):
setattr
(
self
.
gate
,
'moe_gruop'
,
self
.
moe_group
)
def
expert_fn
(
self
,
inp
,
fwd_expert_count
):
r
"""
The default expert function which either calls the experts as a whole
...
...
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