Commit 1871b615 authored by Yuxin Wu's avatar Yuxin Wu

fix bug in last commit (fix #929)

parent 238603b7
...@@ -24,7 +24,6 @@ class NewSessionCreator(tf.train.SessionCreator): ...@@ -24,7 +24,6 @@ class NewSessionCreator(tf.train.SessionCreator):
target, config: same as :meth:`Session.__init__()`. target, config: same as :meth:`Session.__init__()`.
config: a :class:`tf.ConfigProto` instance, defaults to :func:`tfutils.get_default_sess_config()` config: a :class:`tf.ConfigProto` instance, defaults to :func:`tfutils.get_default_sess_config()`
""" """
self.config = config
self.target = target self.target = target
if config is None: if config is None:
...@@ -37,6 +36,7 @@ class NewSessionCreator(tf.train.SessionCreator): ...@@ -37,6 +36,7 @@ class NewSessionCreator(tf.train.SessionCreator):
logger.warn( logger.warn(
"User-provided custom session config may not work due to TF \ "User-provided custom session config may not work due to TF \
bugs. See https://github.com/tensorpack/tensorpack/issues/497 for workarounds.") bugs. See https://github.com/tensorpack/tensorpack/issues/497 for workarounds.")
self.config = config
def create_session(self): def create_session(self):
sess = tf.Session(target=self.target, config=self.config) sess = tf.Session(target=self.target, config=self.config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment