Commit 13dc646b authored by Yuxin Wu's avatar Yuxin Wu

update sphinx requirements, add missing docs

parent ab1951d5
API Documentation
--------------------
.. toctree::
:maxdepth: 1
tensorpack.models
tensorpack.dataflow
tensorpack.callbacks
tensorpack.train
tensorpack.utils
tensorpack.tfutils
tensorpack.predict
tensorpack.RL
...@@ -3,4 +3,5 @@ numpy ...@@ -3,4 +3,5 @@ numpy
tqdm tqdm
nltk nltk
decorator decorator
Sphinx==1.5.1
recommonmark==0.4.0 recommonmark==0.4.0
## A High-Level Glance
TODO
Tutorials
---------------------
Test.
.. toctree::
:maxdepth: 2
glance
dataflow
models
...@@ -14,6 +14,15 @@ from tensorpack.utils.argtools import memoized ...@@ -14,6 +14,15 @@ from tensorpack.utils.argtools import memoized
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
_CM = plt.get_cmap('jet') _CM = plt.get_cmap('jet')
"""
15 channels:
0-1 head, neck
2-4 right shoulder, right elbow, right wrist
5-7 left shoulder, left elbow, left wrist
8-10 right hip, right knee, right ankle
11-13 left hip, left knee, left ankle
14: background
"""
def colorize(img, heatmap): def colorize(img, heatmap):
""" img: bgr, [0,255] """ img: bgr, [0,255]
...@@ -37,7 +46,6 @@ def get_gaussian_map(): ...@@ -37,7 +46,6 @@ def get_gaussian_map():
class Model(ModelDesc): class Model(ModelDesc):
def _get_input_vars(self): def _get_input_vars(self):
return [InputVar(tf.float32, (None, 368, 368, 3), 'input'), return [InputVar(tf.float32, (None, 368, 368, 3), 'input'),
InputVar(tf.float32, (None, 368, 368, 15), 'label'), InputVar(tf.float32, (None, 368, 368, 15), 'label'),
......
...@@ -155,7 +155,7 @@ class Model(ModelDesc): ...@@ -155,7 +155,7 @@ class Model(ModelDesc):
add_moving_summary(tf.reduce_mean(wrong, name='train-error-top5')) add_moving_summary(tf.reduce_mean(wrong, name='train-error-top5'))
# weight decay on all W of fc layers # weight decay on all W of fc layers
wd_cost = regularize_cost('fc.*/W', l2_regularizer(5e-6)) wd_cost = regularize_cost('fc.*/W', l2_regularizer(5e-6), name='regularize_cost')
add_param_summary(('.*/W', ['histogram', 'rms'])) add_param_summary(('.*/W', ['histogram', 'rms']))
self.cost = tf.add_n([cost, wd_cost], name='cost') self.cost = tf.add_n([cost, wd_cost], name='cost')
......
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