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
c088e2a6
Commit
c088e2a6
authored
Mar 19, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix doc build. make MergeAllSummaries a Triggerable
parent
c15c8639
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
docs/conf.py
docs/conf.py
+1
-6
setup.py
setup.py
+0
-2
tensorpack/callbacks/summary.py
tensorpack/callbacks/summary.py
+12
-4
No files found.
docs/conf.py
View file @
c088e2a6
...
...
@@ -22,12 +22,7 @@ sys.path.insert(0, os.path.abspath('../'))
os
.
environ
[
'TENSORPACK_DOC_BUILDING'
]
=
'1'
MOCK_MODULES
=
[
'scipy'
,
#'tensorflow', 'tensorflow.contrib',
#'tensorflow.python.ops',
#'tensorflow.contrib.framework',
#'tensorflow.python',
#'tensorflow.python.training',
MOCK_MODULES
=
[
'scipy'
,
'tabulate'
,
'sklearn.datasets'
,
'sklearn'
,
'scipy.misc'
,
'h5py'
,
'nltk'
,
'cv2'
,
'scipy.io'
,
'dill'
,
'zmq'
,
'subprocess32'
,
'lmdb'
,
...
...
setup.py
View file @
c088e2a6
...
...
@@ -20,7 +20,6 @@ except ImportError:
# configure requirements
reqfile
=
os
.
path
.
join
(
CURRENT_DIR
,
'requirements.txt'
)
req
=
[
x
.
strip
()
for
x
in
open
(
reqfile
)
.
readlines
()]
reqfile
=
os
.
path
.
join
(
CURRENT_DIR
,
'opt-requirements.txt'
)
extra_req
=
[
x
.
strip
()
for
x
in
open
(
reqfile
)
.
readlines
()]
...
...
@@ -43,7 +42,6 @@ setup(
version
=
__version__
,
description
=
'Neural Network Toolbox on TensorFlow'
,
long_description
=
long_description
,
install_requires
=
req
,
tests_require
=
[
'flake8'
],
extras_require
=
{
...
...
tensorpack/callbacks/summary.py
View file @
c088e2a6
...
...
@@ -6,7 +6,7 @@
import
tensorflow
as
tf
from
..utils.naming
import
MOVING_SUMMARY_OPS_KEY
from
.base
import
Callback
from
.base
import
Callback
,
Triggerable
__all__
=
[
'MovingAverageSummary'
,
'MergeAllSummaries'
]
...
...
@@ -32,7 +32,7 @@ class MovingAverageSummary(Callback):
return
[
self
.
ema_op
]
class
MergeAllSummaries
(
Callback
):
class
MergeAllSummaries
(
Triggerable
):
"""
Evaluate all summaries by `tf.summary.merge_all`, and write to logs.
"""
...
...
@@ -70,7 +70,15 @@ class MergeAllSummaries(Callback):
return
self
.
trainer
.
monitors
.
put_summary
(
summary
)
def
_trigger_epoch
(
self
):
if
self
.
_run_alone
:
def
_summary_run_alone
(
self
):
summary
=
self
.
summary_op
.
eval
()
self
.
trainer
.
monitors
.
put_summary
(
summary
)
def
_trigger_epoch
(
self
):
if
self
.
_run_alone
:
self
.
_summary_run_alone
()
def
_trigger
(
self
):
assert
self
.
_run_alone
,
\
"MergeAllSummaries can be used as a trigger only if run_alone=True."
self
.
_summary_run_alone
()
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