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
af8c4737
Unverified
Commit
af8c4737
authored
May 19, 2023
by
Arturo Ghinassi
Committed by
GitHub
May 19, 2023
Browse files
Cast input to weights type for AMP support
parent
a31fcc55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fmoe/linear.py
fmoe/linear.py
+1
-1
No files found.
fmoe/linear.py
View file @
af8c4737
...
@@ -70,7 +70,7 @@ class FMoELinear(nn.Module):
...
@@ -70,7 +70,7 @@ class FMoELinear(nn.Module):
r
"""
r
"""
Call MOE function
Call MOE function
"""
"""
x
=
MOELinear
.
apply
(
inp
,
fwd_expert_count
,
self
.
weight
,
self
.
bias
)
x
=
MOELinear
.
apply
(
inp
.
type_as
(
self
.
weight
)
,
fwd_expert_count
,
self
.
weight
,
self
.
bias
)
return
x
return
x
def
extra_repr
(
self
)
->
str
:
def
extra_repr
(
self
)
->
str
:
...
...
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