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
2e058ee1
Commit
2e058ee1
authored
Jan 28, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more checks in add_moving_summary
parent
e515ad88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tensorpack/tfutils/summary.py
tensorpack/tfutils/summary.py
+3
-2
No files found.
tensorpack/tfutils/summary.py
View file @
2e058ee1
...
@@ -223,8 +223,9 @@ def add_moving_summary(*args, **kwargs):
...
@@ -223,8 +223,9 @@ def add_moving_summary(*args, **kwargs):
log_deprecated
(
"Call add_moving_summary with positional args instead of a list!"
,
eos
=
"2018-02-28"
)
log_deprecated
(
"Call add_moving_summary with positional args instead of a list!"
,
eos
=
"2018-02-28"
)
v
=
args
[
0
]
v
=
args
[
0
]
for
x
in
v
:
for
x
in
v
:
assert
isinstance
(
x
,
tf
.
Tensor
),
x
assert
isinstance
(
x
,
(
tf
.
Tensor
,
tf
.
Variable
)),
x
assert
x
.
get_shape
()
.
ndims
==
0
,
x
.
get_shape
()
assert
x
.
get_shape
()
.
ndims
==
0
,
\
"add_moving_summary() only accepts scalar tensor! Got one with {}"
.
format
(
x
.
get_shape
())
G
=
tf
.
get_default_graph
()
G
=
tf
.
get_default_graph
()
# TODO variable not saved under distributed
# TODO variable not saved under distributed
...
...
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