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
0edd811d
"vscode:/vscode.git/clone" did not exist on "dcfb18a2d340d8e1f0ff001b06d2931ffa8648da"
Commit
0edd811d
authored
Apr 30, 2022
by
zms1999
Browse files
fix shape mismatch in set_grad
parent
d90ff389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fmoe/fastermoe/expert_utils.py
fmoe/fastermoe/expert_utils.py
+1
-1
No files found.
fmoe/fastermoe/expert_utils.py
View file @
0edd811d
...
...
@@ -53,6 +53,6 @@ def set_grads(e, grads):
seg
=
grads
[
offset
:
offset
+
p
.
numel
()]
offset
+=
p
.
numel
()
if
p
.
grad
is
None
:
p
.
grad
=
seg
.
clone
()
p
.
grad
=
seg
.
clone
()
.
reshape
(
p
.
shape
)
else
:
p
.
grad
+=
seg
.
reshape
(
p
.
shape
)
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