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
f55d81f2
Commit
f55d81f2
authored
Nov 29, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs about inference
parent
38818ff2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
docs/tutorial/index.rst
docs/tutorial/index.rst
+1
-0
docs/tutorial/inference.md
docs/tutorial/inference.md
+30
-0
No files found.
docs/tutorial/index.rst
View file @
f55d81f2
...
@@ -21,6 +21,7 @@ User Tutorials
...
@@ -21,6 +21,7 @@ User Tutorials
callback
callback
save-load
save-load
summary
summary
inference
faq
faq
...
...
docs/tutorial/inference.md
0 → 100644
View file @
f55d81f2
# Inference
## Inference During Training
There are two ways to do inference during training.
1.
The easiest way is to write a callback, and use
` self.trainer.get_predictor()`
to get a callable under inference mode.
See
[
Write a Callback
](
extend/callback.html
)
2.
If your inference follows the paradigm of:
"fetch some tensors for each input, and aggregate the results".
You can use the
`InferenceRunner`
interface with some
`Inferencer`
.
This will further support prefetch & data-parallel inference.
More details to come.
## Inference After Training
Tensorpack doesn't care what happened after training.
It saves models to standard checkpoint format, plus a metagraph protobuf file.
They are sufficient to use with whatever deployment methods TensorFlow supports.
But you'll need to read the docs and do it on your own.
The only thing tensorpack has is
`OfflinePredictor`
,
a simple function to build the graph and a callable for you.
It only runs inference on Python data, therefore may not be the best way.
It is mainly for quick demo purpose.
Check out some examples for the usage.
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