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
4edeccd9
Unverified
Commit
4edeccd9
authored
Nov 29, 2021
by
Jiezhong Qiu
Committed by
GitHub
Nov 29, 2021
Browse files
Merge pull request #92 from laekov/naive-gate-fix
Fix naive gate output score
parents
9dc9c1fa
a6ca7f62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fmoe/gates/naive_gate.py
fmoe/gates/naive_gate.py
+2
-2
No files found.
fmoe/gates/naive_gate.py
View file @
4edeccd9
...
@@ -38,5 +38,5 @@ class NaiveGate(BaseGate):
...
@@ -38,5 +38,5 @@ class NaiveGate(BaseGate):
gate_score
=
F
.
softmax
(
gate_top_k_val
,
dim
=-
1
)
gate_score
=
F
.
softmax
(
gate_top_k_val
,
dim
=-
1
)
if
return_all_scores
:
if
return_all_scores
:
return
gate_top_k_idx
,
gate_
top_k_val
,
gate
return
gate_top_k_idx
,
gate_
score
,
gate
return
gate_top_k_idx
,
gate_
top_k_val
return
gate_top_k_idx
,
gate_
score
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