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
0addcdc6
Commit
0addcdc6
authored
Oct 20, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix session creator bug for distributed trainer.
parent
c99d013a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
tensorpack/graph_builder/model_desc.py
tensorpack/graph_builder/model_desc.py
+1
-2
tensorpack/train/base.py
tensorpack/train/base.py
+0
-1
tensorpack/train/config.py
tensorpack/train/config.py
+2
-3
No files found.
tensorpack/graph_builder/model_desc.py
View file @
0addcdc6
...
...
@@ -86,13 +86,12 @@ class ModelDescBase(object):
:returns: a list of InputDesc
"""
# TODO only use InputSource in the future? Now only used in predictor_factory
def
build_graph
(
self
,
inputs
):
"""
Build the whole symbolic graph.
Args:
inputs (list[tf.Tensor]
or InputSource): a list of tensors, or an :class:`InputSource`
,
inputs (list[tf.Tensor]
): a list of tensors
,
that match the list of :class:`InputDesc` defined by ``_get_inputs``.
"""
if
isinstance
(
inputs
,
InputSource
):
...
...
tensorpack/train/base.py
View file @
0addcdc6
...
...
@@ -278,7 +278,6 @@ class Trainer(object):
Returns:
an :class:`OnlinePredictor`.
"""
# TODO move the logic to factory?
return
self
.
predictor_factory
.
get_predictor
(
input_names
,
output_names
,
tower
)
@
property
...
...
tensorpack/train/config.py
View file @
0addcdc6
...
...
@@ -9,8 +9,7 @@ from ..callbacks import (
from
..dataflow.base
import
DataFlow
from
..graph_builder.model_desc
import
ModelDescBase
from
..utils
import
logger
from
..tfutils
import
(
JustCurrentSession
,
get_default_sess_config
,
SessionInit
)
from
..tfutils
import
(
JustCurrentSession
,
SessionInit
)
from
..tfutils.sesscreate
import
NewSessionCreator
from
..input_source
import
InputSource
from
..utils.develop
import
log_deprecated
...
...
@@ -98,7 +97,7 @@ class TrainConfig(object):
if
session_config
is
not
None
:
self
.
session_creator
=
NewSessionCreator
(
config
=
session_config
)
else
:
self
.
session_creator
=
NewSessionCreator
(
config
=
get_default_sess_config
()
)
self
.
session_creator
=
NewSessionCreator
(
config
=
None
)
else
:
self
.
session_creator
=
session_creator
assert
session_config
is
None
,
"Cannot set both session_creator and session_config!"
...
...
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