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
76cbc245
Commit
76cbc245
authored
Jun 06, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme
parent
afab50e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
README.md
README.md
+5
-4
examples/Atari2600/README.md
examples/Atari2600/README.md
+1
-1
tensorpack/callbacks/inference.py
tensorpack/callbacks/inference.py
+6
-3
No files found.
README.md
View file @
76cbc245
# tensorpack
# tensorpack
Neural Network Toolbox on TensorFlow
Neural Network Toolbox on TensorFlow
In development. API might change a bit.
In development but usable. API might change a bit.
See
[
examples
](
https://github.com/ppwwyyxx/tensorpack/tree/master/examples
)
to learn.
See some interesting
[
examples
](
https://github.com/ppwwyyxx/tensorpack/tree/master/examples
)
to learn.
## Features:
## Features:
Focused on modularity:
Focused on modularity:
+
Models has
S
coped abstraction of common models.
+
Models has
s
coped abstraction of common models.
+
Dataflow defines data preprocessing in pure Python.
+
Dataflow defines data preprocessing in pure Python.
+
Callbacks systems
to control
training behavior.
+
Callbacks systems
controls
training behavior.
examples/Atari2600/README.md
View file @
76cbc245
...
@@ -11,4 +11,4 @@ To run:
...
@@ -11,4 +11,4 @@ To run:
./DQN.py --rom breakout.rom --gpu 0
./DQN.py --rom breakout.rom --gpu 0
```
```
A demo trained with Double-DQN
is available at
[
youtube
](
https://youtu.be/o21mddZtE5Y
)
A demo trained with Double-DQN
on breakout is available at
[
youtube
](
https://youtu.be/o21mddZtE5Y
)
.
tensorpack/callbacks/inference.py
View file @
76cbc245
...
@@ -156,7 +156,7 @@ class ScalarStats(Inferencer):
...
@@ -156,7 +156,7 @@ class ScalarStats(Inferencer):
class
ClassificationError
(
Inferencer
):
class
ClassificationError
(
Inferencer
):
"""
"""
Validate the accuracy
from a `wrong` variable
Compute classification error
from a `wrong` variable
The `wrong` variable is supposed to be an integer equal to the number of failed samples in this batch.
The `wrong` variable is supposed to be an integer equal to the number of failed samples in this batch.
You can use `tf.nn.in_top_k` to record top-k error as well.
You can use `tf.nn.in_top_k` to record top-k error as well.
...
@@ -164,12 +164,12 @@ class ClassificationError(Inferencer):
...
@@ -164,12 +164,12 @@ class ClassificationError(Inferencer):
This callback produce the "true" error,
This callback produce the "true" error,
taking account of the fact that batches might not have the same size in
taking account of the fact that batches might not have the same size in
testing (because the size of test set might not be a multiple of batch size).
testing (because the size of test set might not be a multiple of batch size).
In theory, the result could be different from what produced by ValidationStatPrinter
.
Therefore the result is different from averaging the error rate of each batch
.
"""
"""
def
__init__
(
self
,
wrong_var_name
=
'wrong:0'
,
summary_name
=
'validation_error'
):
def
__init__
(
self
,
wrong_var_name
=
'wrong:0'
,
summary_name
=
'validation_error'
):
"""
"""
:param wrong_var_name: name of the `wrong` variable
:param wrong_var_name: name of the `wrong` variable
:param summary_name:
an optional prefix
for logging
:param summary_name:
the name
for logging
"""
"""
self
.
wrong_var_name
=
wrong_var_name
self
.
wrong_var_name
=
wrong_var_name
self
.
summary_name
=
summary_name
self
.
summary_name
=
summary_name
...
@@ -189,6 +189,9 @@ class ClassificationError(Inferencer):
...
@@ -189,6 +189,9 @@ class ClassificationError(Inferencer):
self
.
trainer
.
write_scalar_summary
(
self
.
summary_name
,
self
.
err_stat
.
accuracy
)
self
.
trainer
.
write_scalar_summary
(
self
.
summary_name
,
self
.
err_stat
.
accuracy
)
class
BinaryClassificationStats
(
Inferencer
):
class
BinaryClassificationStats
(
Inferencer
):
""" Compute precision/recall in binary classification, given the
prediction vector and the label vector.
"""
def
__init__
(
self
,
pred_var_name
,
label_var_name
,
summary_prefix
=
'val'
):
def
__init__
(
self
,
pred_var_name
,
label_var_name
,
summary_prefix
=
'val'
):
"""
"""
...
...
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