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
a9cba3c6
Commit
a9cba3c6
authored
Jul 31, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
fde338ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
docs/tutorial/graph.md
docs/tutorial/graph.md
+3
-2
docs/tutorial/symbolic.md
docs/tutorial/symbolic.md
+1
-1
docs/tutorial/trainer.md
docs/tutorial/trainer.md
+5
-8
No files found.
docs/tutorial/graph.md
View file @
a9cba3c6
...
...
@@ -3,7 +3,7 @@
### ModelDesc
`ModelDesc`
is an abstraction over the most common type of models people train
:
`ModelDesc`
is an abstraction over the most common type of models people train
.
It assumes:
1.
Training is a single-cost optimized by a single
`tf.train.Optimizer`
.
...
...
@@ -18,8 +18,9 @@ class MyModel(ModelDesc):
return
[
InputDesc
(
...
),
InputDesc
(
...
)]
def
_build_graph
(
self
,
inputs
):
tensorA
,
tensorB
=
inputs
tensorA
,
tensorB
=
inputs
# build the graph
self
.
cost
=
xxx
# define the cost tensor
def
_get_optimizer
(
self
):
return
tf
.
train
.
GradientDescentOptimizer
(
0.1
)
...
...
docs/tutorial/symbolic.md
View file @
a9cba3c6
...
...
@@ -7,7 +7,7 @@ such as conv/deconv, fc, batch normalization, pooling layers, and some custom lo
Using the tensorpack implementations, you can also benefit from
`argscope`
and
`LinearWrap`
to
simplify the code.
Note that the layers
a
re written because there are no other alternatives back at that time.
Note that the layers
we
re written because there are no other alternatives back at that time.
In the future we may shift to
`tf.layers`
because they will be better maintained.
### argscope and LinearWrap
...
...
docs/tutorial/trainer.md
View file @
a9cba3c6
...
...
@@ -2,21 +2,18 @@
# Trainer
Training is
**running something again and again**
.
Tensorpack base trainer implements the logic of __running the iteration__
,
and derived trainers
implement __what the iteration is__.
Tensorpack base trainer implements the logic of __running the iteration__
.
Users or derived trainers should
implement __what the iteration is__.
Most neural network training tasks are single-cost optimization.
Tensorpack provides some trainer implementations for such tasks.
These trainers will by default minimizes
`ModelDesc.cost`
.
Therefore, you can use these trainers as long as you set
`self.cost`
in
`ModelDesc._build_graph()`
,
as most examples did.
Tensorpack provides some trainer implementations for such tasks:
These trainers will build the graph based on the given
`ModelDesc`
, and minimizes
`ModelDesc.cost`
.
Existing trainers were implemented with certain prefetch mechanism,
which will run significantly faster than a naive
`sess.run(..., feed_dict={...})`
.
There are also Multi-GPU trainers which include the logic of data-parallel Multi-GPU training.
You can enable them by just changing one line, and all the necessary logic to achieve the best
performance was baked into the trainers already.
You can enable them by just one line, and all the necessary logic to achieve the best performance was baked into the trainers already.
For example, SyncMultiGPUTrainer can train ResNet50 as fast as the
[
official tensorflow benchmark
](
https://github.com/tensorflow/benchmarks
)
.
To use trainers, pass a
`TrainConfig`
to configure them:
...
...
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