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
ac2031df
Commit
ac2031df
authored
Aug 07, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include graph_builder in API doc
parent
c7b5a85f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
11 deletions
+22
-11
docs/modules/graph_builder.rst
docs/modules/graph_builder.rst
+7
-0
docs/modules/index.rst
docs/modules/index.rst
+2
-1
docs/requirements.txt
docs/requirements.txt
+0
-1
tensorpack/graph_builder/predictor_factory.py
tensorpack/graph_builder/predictor_factory.py
+1
-1
tensorpack/train/base.py
tensorpack/train/base.py
+10
-6
tensorpack/train/config.py
tensorpack/train/config.py
+2
-2
No files found.
docs/modules/graph_builder.rst
0 → 100644
View file @
ac2031df
tensorpack.graph_builder package
================================
.. automodule:: tensorpack.graph_builder
:members:
:undoc-members:
:show-inheritance:
docs/modules/index.rst
View file @
ac2031df
...
@@ -5,9 +5,10 @@ API Documentation
...
@@ -5,9 +5,10 @@ API Documentation
:maxdepth: 1
:maxdepth: 1
models
dataflow
dataflow
models
callbacks
callbacks
graph_builder
train
train
predict
predict
tfutils
tfutils
...
...
docs/requirements.txt
View file @
ac2031df
termcolor
termcolor
numpy
numpy
tqdm
tqdm
decorator
tensorflow
tensorflow
Sphinx>=1.6
Sphinx>=1.6
recommonmark==0.4.0
recommonmark==0.4.0
...
...
tensorpack/graph_builder/predictor_factory.py
View file @
ac2031df
...
@@ -10,7 +10,7 @@ from ..tfutils.collection import freeze_collection
...
@@ -10,7 +10,7 @@ from ..tfutils.collection import freeze_collection
from
..utils.naming
import
TOWER_FREEZE_KEYS
from
..utils.naming
import
TOWER_FREEZE_KEYS
from
.input_source
import
PlaceholderInput
from
.input_source
import
PlaceholderInput
__all__
=
[
'PredictorFactory'
]
__all__
=
[]
class
PredictorTowerHandle
(
object
):
class
PredictorTowerHandle
(
object
):
...
...
tensorpack/train/base.py
View file @
ac2031df
...
@@ -105,8 +105,8 @@ class Trainer(object):
...
@@ -105,8 +105,8 @@ class Trainer(object):
def
register_callback
(
self
,
cb
):
def
register_callback
(
self
,
cb
):
"""
"""
Use this method before :meth:`Trainer._setup` finishes,
Register a callback to the trainer.
to register a callback to the trainer
.
It can only be called before :meth:`Trainer.train` gets called
.
"""
"""
assert
isinstance
(
cb
,
Callback
),
cb
assert
isinstance
(
cb
,
Callback
),
cb
assert
not
isinstance
(
self
.
_callbacks
,
Callbacks
),
\
assert
not
isinstance
(
self
.
_callbacks
,
Callbacks
),
\
...
@@ -117,6 +117,10 @@ class Trainer(object):
...
@@ -117,6 +117,10 @@ class Trainer(object):
self
.
_callbacks
.
append
(
cb
)
self
.
_callbacks
.
append
(
cb
)
def
register_monitor
(
self
,
mon
):
def
register_monitor
(
self
,
mon
):
"""
Register a monitor to the trainer.
It can only be called before :meth:`Trainer.train` gets called.
"""
assert
isinstance
(
mon
,
TrainingMonitor
),
mon
assert
isinstance
(
mon
,
TrainingMonitor
),
mon
assert
not
isinstance
(
self
.
monitors
,
Monitors
),
\
assert
not
isinstance
(
self
.
monitors
,
Monitors
),
\
"Cannot register more monitors after trainer was setup!"
"Cannot register more monitors after trainer was setup!"
...
@@ -200,12 +204,12 @@ class Trainer(object):
...
@@ -200,12 +204,12 @@ class Trainer(object):
@
property
@
property
def
global_step
(
self
):
def
global_step
(
self
):
"""
"""
The tensorflow global_step, i.e. how many times `
hooked_sess.run
` has been called.
The tensorflow global_step, i.e. how many times `
`hooked_sess.run`
` has been called.
Note:
Note:
1. global_step is incremented **after** each `
hooked_sess.run
` returns from TF runtime.
1. global_step is incremented **after** each `
`hooked_sess.run`
` returns from TF runtime.
2. If you make zero or more than one calls to `
hooked_sess.run
` in one
2. If you make zero or more than one calls to `
`hooked_sess.run`
` in one
`run_step`, local_step and global_step may increment at different speed.
:meth:
`run_step`, local_step and global_step may increment at different speed.
"""
"""
return
self
.
_global_step
return
self
.
_global_step
...
...
tensorpack/train/config.py
View file @
ac2031df
...
@@ -61,8 +61,8 @@ class TrainConfig(object):
...
@@ -61,8 +61,8 @@ class TrainConfig(object):
max_epoch (int): maximum number of epoch to run training.
max_epoch (int): maximum number of epoch to run training.
nr_tower (int): number of training towers, used by multigpu trainers.
nr_tower (int): number of training towers, used by multigpu trainers.
tower (
list of int
): list of training towers in relative GPU id.
tower (
[int]
): list of training towers in relative GPU id.
predict_tower (
list of int
): list of prediction towers in their relative gpu id. Use -1 for cpu.
predict_tower (
[int]
): list of prediction towers in their relative gpu id. Use -1 for cpu.
"""
"""
# TODO type checker decorator
# TODO type checker decorator
...
...
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