Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
maskrcnn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
maskrcnn
Commits
ced10f20
Commit
ced10f20
authored
Nov 28, 2018
by
wat3rBro
Committed by
Francisco Massa
Nov 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always save checkpoint as model_final.pth after reaching max_iter (#218)
parent
ef8a93b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
trainer.py
maskrcnn_benchmark/engine/trainer.py
+3
-1
No files found.
maskrcnn_benchmark/engine/trainer.py
View file @
ced10f20
...
@@ -101,8 +101,10 @@ def do_train(
...
@@ -101,8 +101,10 @@ def do_train(
memory
=
torch
.
cuda
.
max_memory_allocated
()
/
1024.0
/
1024.0
,
memory
=
torch
.
cuda
.
max_memory_allocated
()
/
1024.0
/
1024.0
,
)
)
)
)
if
iteration
%
checkpoint_period
==
0
or
iteration
==
max_iter
:
if
iteration
%
checkpoint_period
==
0
:
checkpointer
.
save
(
"model_{:07d}"
.
format
(
iteration
),
**
arguments
)
checkpointer
.
save
(
"model_{:07d}"
.
format
(
iteration
),
**
arguments
)
if
iteration
==
max_iter
:
checkpointer
.
save
(
"model_final"
,
**
arguments
)
total_training_time
=
time
.
time
()
-
start_training_time
total_training_time
=
time
.
time
()
-
start_training_time
total_time_str
=
str
(
datetime
.
timedelta
(
seconds
=
total_training_time
))
total_time_str
=
str
(
datetime
.
timedelta
(
seconds
=
total_training_time
))
...
...
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