Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
0fc880b7
Commit
0fc880b7
authored
May 11, 2017
by
Patrick Wieschollek
Committed by
Yuxin Wu
May 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minsaver bugfix (#265)
parent
ca16fb7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
examples/mnist-convnet.py
examples/mnist-convnet.py
+1
-0
tensorpack/callbacks/saver.py
tensorpack/callbacks/saver.py
+1
-1
No files found.
examples/mnist-convnet.py
View file @
0fc880b7
...
@@ -116,6 +116,7 @@ def get_config():
...
@@ -116,6 +116,7 @@ def get_config():
dataflow
=
dataset_train
,
# the DataFlow instance for training
dataflow
=
dataset_train
,
# the DataFlow instance for training
callbacks
=
[
callbacks
=
[
ModelSaver
(),
# save the model after every epoch
ModelSaver
(),
# save the model after every epoch
MaxSaver
(
'validation_accuracy'
),
# save the model with highest accuracy (prefix 'validation_')
InferenceRunner
(
# run inference(for validation) after every epoch
InferenceRunner
(
# run inference(for validation) after every epoch
dataset_test
,
# the DataFlow instance used for validation
dataset_test
,
# the DataFlow instance used for validation
# Calculate both the cost and the error for this DataFlow
# Calculate both the cost and the error for this DataFlow
...
...
tensorpack/callbacks/saver.py
View file @
0fc880b7
...
@@ -126,7 +126,7 @@ class MinSaver(Callback):
...
@@ -126,7 +126,7 @@ class MinSaver(Callback):
newname
=
os
.
path
.
join
(
logger
.
LOG_DIR
,
newname
=
os
.
path
.
join
(
logger
.
LOG_DIR
,
self
.
filename
or
self
.
filename
or
(
'max-'
if
self
.
reverse
else
'min-'
+
self
.
monitor_stat
))
(
'max-'
+
self
.
monitor_stat
if
self
.
reverse
else
'min-'
+
self
.
monitor_stat
))
files_to_copy
=
glob
.
glob
(
path
+
'*'
)
files_to_copy
=
glob
.
glob
(
path
+
'*'
)
for
file_to_copy
in
files_to_copy
:
for
file_to_copy
in
files_to_copy
:
shutil
.
copy
(
file_to_copy
,
file_to_copy
.
replace
(
path
,
newname
))
shutil
.
copy
(
file_to_copy
,
file_to_copy
.
replace
(
path
,
newname
))
...
...
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