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
582ec017
Commit
582ec017
authored
Apr 19, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docs for tfutils.dependency
parent
8d888d30
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
docs/modules/tfutils.rst
docs/modules/tfutils.rst
+8
-0
docs/tutorial/faq.md
docs/tutorial/faq.md
+7
-6
tensorpack/tfutils/dependency.py
tensorpack/tfutils/dependency.py
+2
-2
No files found.
docs/modules/tfutils.rst
View file @
582ec017
...
...
@@ -103,6 +103,14 @@ tensorpack.tfutils.export module
:undoc-members:
:show-inheritance:
tensorpack.tfutils.dependency module
------------------------------------
.. automodule:: tensorpack.tfutils.dependency
:members:
:undoc-members:
:show-inheritance:
Other functions in tensorpack.tfutils module
---------------------------------------------
...
...
docs/tutorial/faq.md
View file @
582ec017
...
...
@@ -19,12 +19,13 @@ Then it is a good time to open an issue.
## How to print/dump intermediate results during training
1.
Learn
`tf.Print`
. Most of the times, adding one line in between:
```
python
tensor
=
obtain_a_tensor
()
tensor
=
tf
.
Print
(
tensor
,
[
tf
.
shape
(
tensor
),
tensor
],
tensor
.
name
,
summarize
=
100
)
use_the_tensor
(
tensor
)
```
is sufficient.
```
python
tensor
=
obtain_a_tensor
()
tensor
=
tf
.
Print
(
tensor
,
[
tf
.
shape
(
tensor
),
tensor
],
tensor
.
name
,
summarize
=
100
)
use_the_tensor
(
tensor
)
```
is sufficient.
2.
Know
[
DumpTensors
](
../modules/callbacks.html#tensorpack.callbacks.DumpTensors
)
,
[
ProcessTensors
](
../modules/callbacks.html#tensorpack.callbacks.ProcessTensors
)
callbacks.
...
...
tensorpack/tfutils/dependency.py
View file @
582ec017
...
...
@@ -25,7 +25,7 @@ def dependency_of_targets(targets, op):
op (tf.Operation or tf.Tensor):
Returns:
bool
bool
: True if any one of `targets` depend on `op`.
"""
# TODO tensorarray? sparsetensor?
if
isinstance
(
op
,
tf
.
Tensor
):
...
...
@@ -48,7 +48,7 @@ def dependency_of_fetches(fetches, op):
op (tf.Operation or tf.Tensor):
Returns:
bool
bool
: True if any of `fetches` depend on `op`.
"""
try
:
from
tensorflow.python.client.session
import
_FetchHandler
as
FetchHandler
...
...
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