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
28ab4781
Commit
28ab4781
authored
Mar 18, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid using MonitoredSession._tf_sess (#194)
parent
083c1c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tensorpack/train/base.py
tensorpack/train/base.py
+4
-2
No files found.
tensorpack/train/base.py
View file @
28ab4781
...
...
@@ -20,6 +20,7 @@ from ..utils.develop import deprecated, log_deprecated
from
..callbacks
import
Callback
,
Callbacks
,
MaintainStepCounter
from
..tfutils
import
get_global_step_value
from
..tfutils.modelutils
import
describe_model
from
..tfutils.sesscreate
import
ReuseSessionCreator
__all__
=
[
'Trainer'
,
'StopTraining'
,
'MultiPredictorTowerTrainer'
]
...
...
@@ -118,9 +119,10 @@ class Trainer(object):
# create session
sess_creator
=
self
.
config
.
session_creator
logger
.
info
(
"Finalize the graph, create the session ..."
)
self
.
sess
=
sess_creator
.
create_session
()
self
.
_monitored_sess
=
tf
.
train
.
MonitoredSession
(
session_creator
=
sess_creator
,
hooks
=
None
)
self
.
sess
=
self
.
_monitored_sess
.
_tf_sess
()
# expose the underlying session also
session_creator
=
ReuseSessionCreator
(
self
.
sess
),
hooks
=
None
)
# init session
init_op
=
tf
.
global_variables_initializer
()
...
...
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