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
979d18ca
Commit
979d18ca
authored
Jul 27, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saver write metagraph in before_train
parent
e2be301b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tensorpack/callbacks/saver.py
tensorpack/callbacks/saver.py
+7
-7
No files found.
tensorpack/callbacks/saver.py
View file @
979d18ca
...
...
@@ -67,16 +67,16 @@ class ModelSaver(Callback):
keep_checkpoint_every_n_hours
=
self
.
_keep_every_n_hours
,
write_version
=
tf
.
train
.
SaverDef
.
V2
,
save_relative_paths
=
True
)
self
.
meta_graph_written
=
False
def
_trigger
(
self
):
try
:
if
not
self
.
meta_graph_written
:
def
_before_train
(
self
):
# graph is finalized, OK to write it now.
self
.
saver
.
export_meta_graph
(
os
.
path
.
join
(
self
.
checkpoint_dir
,
'graph-{}.meta'
.
format
(
logger
.
get_time_str
())),
collection_list
=
self
.
graph
.
get_all_collection_keys
())
self
.
meta_graph_written
=
True
def
_trigger
(
self
):
try
:
self
.
saver
.
save
(
tf
.
get_default_session
(),
self
.
path
,
...
...
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