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
chenpangpang
transformers
Commits
f4a07a39
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "70f622fab4dabeb4eab66dd1290ab1bc695a9301"
Commit
f4a07a39
authored
Feb 09, 2019
by
thomwolf
Browse files
mems not splitted
parent
43b9af0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_transfo_xl.py
examples/run_transfo_xl.py
+1
-1
No files found.
examples/run_transfo_xl.py
View file @
f4a07a39
...
@@ -102,7 +102,7 @@ def main():
...
@@ -102,7 +102,7 @@ def main():
with
torch
.
no_grad
():
with
torch
.
no_grad
():
mems
=
None
mems
=
None
for
idx
,
(
data
,
target
,
seq_len
)
in
enumerate
(
eval_iter
):
for
idx
,
(
data
,
target
,
seq_len
)
in
enumerate
(
eval_iter
):
ret
=
model
(
data
,
target
,
*
mems
)
ret
=
model
(
data
,
target
,
mems
)
loss
,
mems
=
ret
loss
,
mems
=
ret
loss
=
loss
.
mean
()
loss
=
loss
.
mean
()
total_loss
+=
seq_len
*
loss
.
item
()
total_loss
+=
seq_len
*
loss
.
item
()
...
...
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