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
36d73304
Commit
36d73304
authored
Aug 16, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
a36ad180
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tensorpack/callbacks/saver.py
tensorpack/callbacks/saver.py
+3
-1
No files found.
tensorpack/callbacks/saver.py
View file @
36d73304
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import
tensorflow
as
tf
import
tensorflow
as
tf
from
datetime
import
datetime
import
os
import
os
import
shutil
import
shutil
import
glob
import
glob
...
@@ -71,9 +72,10 @@ class ModelSaver(Callback):
...
@@ -71,9 +72,10 @@ class ModelSaver(Callback):
def
_before_train
(
self
):
def
_before_train
(
self
):
# graph is finalized, OK to write it now.
# graph is finalized, OK to write it now.
time
=
datetime
.
now
()
.
strftime
(
'
%
m
%
d-
%
H
%
M
%
S'
)
self
.
saver
.
export_meta_graph
(
self
.
saver
.
export_meta_graph
(
os
.
path
.
join
(
self
.
checkpoint_dir
,
os
.
path
.
join
(
self
.
checkpoint_dir
,
'graph-{}.meta'
.
format
(
logger
.
get_time_str
()
)),
'graph-{}.meta'
.
format
(
time
)),
collection_list
=
self
.
graph
.
get_all_collection_keys
())
collection_list
=
self
.
graph
.
get_all_collection_keys
())
def
_trigger
(
self
):
def
_trigger
(
self
):
...
...
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