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
5ee17168
Commit
5ee17168
authored
Nov 04, 2018
by
thomwolf
Browse files
what's in loss again
parent
0b7a20c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
run_squad.py
run_squad.py
+1
-1
No files found.
run_squad.py
View file @
5ee17168
...
@@ -873,7 +873,7 @@ def main():
...
@@ -873,7 +873,7 @@ def main():
logger
.
info
(
"HHHHH Forward"
)
logger
.
info
(
"HHHHH Forward"
)
loss
,
_
=
model
(
input_ids
,
segment_ids
,
input_mask
,
start_positions
,
end_positions
)
loss
,
_
=
model
(
input_ids
,
segment_ids
,
input_mask
,
start_positions
,
end_positions
)
model
.
zero_grad
()
model
.
zero_grad
()
logger
.
info
(
"HHHHH Backward
"
)
logger
.
info
(
"HHHHH Backward
, loss: {}"
.
format
(
loss
)
)
loss
.
backward
()
loss
.
backward
()
logger
.
info
(
"HHHHH Loading data"
)
logger
.
info
(
"HHHHH Loading data"
)
optimizer
.
step
()
optimizer
.
step
()
...
...
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