Commit 73ac38c7 authored by Yuxin Wu's avatar Yuxin Wu

misc.

parent 90a74f02
# tensorpack
Neural Network Toolbox on TensorFlow
In development. API might change a bit. See [examples](https://github.com/ppwwyyxx/tensorpack/tree/master/examples) to learn.
In development. API might change a bit.
See [examples](https://github.com/ppwwyyxx/tensorpack/tree/master/examples) to learn.
## Features:
+ Scoped abstraction of common models.
+ Use `Dataflow` to define data preprocessing in pure Python.
+ Callbacks systems to control training.
+ Training and testing are described together. Just need to follow the conventions to setup stuffs.
+ Write summary easier for tensorboard.
Focused on modularity:
+ Models has Scoped abstraction of common models.
+ Dataflow defines data preprocessing in pure Python.
+ Callbacks systems to control training behavior.
......@@ -21,6 +21,12 @@ from tensorpack.callbacks import *
from tensorpack.dataflow import *
from tensorpack.dataflow.dataset import ILSVRCMeta
"""
Usage:
python2 -m tensorpack.utils.loadcaffe PATH/TO/CAFFE/{deploy.prototxt,bvlc_alexnet.caffemodel} alexnet.npy
./load-alexnet.py --load alexnet.npy --input cat.png
"""
BATCH_SIZE = 10
MIN_AFTER_DEQUEUE = 500
CAPACITY = MIN_AFTER_DEQUEUE + 3 * BATCH_SIZE
......
......@@ -23,8 +23,8 @@ from tensorpack.dataflow.dataset import ILSVRCMeta
"""
Usage:
python2 -m tensorpack.utils.loadcaffe PATH/TO/models/VGG/{VGG_ILSVRC_16_layers_deploy.prototxt,VGG_ILSVRC_16_layers.caffemodel} vgg16.npy
./load_vgg16.py --load vgg16.npy --input cat.png
python2 -m tensorpack.utils.loadcaffe PATH/TO/VGG/{VGG_ILSVRC_16_layers_deploy.prototxt,VGG_ILSVRC_16_layers.caffemodel} vgg16.npy
./load-vgg16.py --load vgg16.npy --input cat.png
"""
class Model(ModelDesc):
......
......@@ -168,10 +168,8 @@ class AtariPlayer(RLEnvironment):
def get_stat(self):
try:
print self.stats
return {'avg_score': np.mean(self.stats['score']),
'max_score': float(np.max(self.stats['score']))
}
'max_score': float(np.max(self.stats['score'])) }
except ValueError:
return {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment