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
caf37466
Unverified
Commit
caf37466
authored
Jun 11, 2020
by
Patrick von Platen
Committed by
GitHub
Jun 11, 2020
Browse files
fix indentation issue (#4941)
parent
6293eb04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/transformers/benchmark/benchmark.py
src/transformers/benchmark/benchmark.py
+5
-6
No files found.
src/transformers/benchmark/benchmark.py
View file @
caf37466
...
...
@@ -104,8 +104,8 @@ class PyTorchBenchmark(Benchmark):
)
torch
.
cuda
.
reset_max_memory_cached
()
# calculate loss and do backpropagation
_train
()
# calculate loss and do backpropagation
_train
()
elif
not
self
.
args
.
no_tpu
and
is_torch_tpu_available
():
# tpu
raise
NotImplementedError
(
...
...
@@ -129,8 +129,7 @@ class PyTorchBenchmark(Benchmark):
logger
.
info
(
"Please consider updating PyTorch to version 1.4 to get more accuracy on GPU memory usage"
)
memory
=
Memory
(
torch
.
cuda
.
max_memory_cached
())
memory
=
Memory
(
torch
.
cuda
.
max_memory_reserved
())
memory
=
Memory
(
torch
.
cuda
.
max_memory_reserved
())
return
memory
,
summary
else
:
...
...
@@ -215,8 +214,8 @@ class PyTorchBenchmark(Benchmark):
)
torch
.
cuda
.
reset_max_memory_cached
()
# run forward
_forward
()
# run forward
_forward
()
elif
not
self
.
args
.
no_tpu
and
is_torch_tpu_available
():
# tpu
raise
NotImplementedError
(
...
...
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