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
47de91da
Commit
47de91da
authored
Aug 26, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix checkpoint dir issue under distributed training
parent
82a8953e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tensorpack/callbacks/saver.py
tensorpack/callbacks/saver.py
+4
-1
No files found.
tensorpack/callbacks/saver.py
View file @
47de91da
...
@@ -42,7 +42,10 @@ class ModelSaver(Callback):
...
@@ -42,7 +42,10 @@ class ModelSaver(Callback):
if
checkpoint_dir
is
not
None
:
if
checkpoint_dir
is
not
None
:
if
not
tf
.
gfile
.
IsDirectory
(
checkpoint_dir
):
# v2: tf.io.gfile.isdir
if
not
tf
.
gfile
.
IsDirectory
(
checkpoint_dir
):
# v2: tf.io.gfile.isdir
tf
.
gfile
.
MakeDirs
(
checkpoint_dir
)
# v2: tf.io.gfile.makedirs
tf
.
gfile
.
MakeDirs
(
checkpoint_dir
)
# v2: tf.io.gfile.makedirs
self
.
checkpoint_dir
=
os
.
path
.
normpath
(
checkpoint_dir
)
# If None, allow it to be init, but fail later if used
# For example, if chief_only=True, it can still be safely initialized
# in non-chief workers which don't have logger dir
self
.
checkpoint_dir
=
os
.
path
.
normpath
(
checkpoint_dir
)
if
checkpoint_dir
is
not
None
else
checkpoint_dir
def
_setup_graph
(
self
):
def
_setup_graph
(
self
):
assert
self
.
checkpoint_dir
is
not
None
,
\
assert
self
.
checkpoint_dir
is
not
None
,
\
...
...
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