Commit c3f5307e authored by Yuxin Wu's avatar Yuxin Wu

fix doc structure

parent 9c42c84f
...@@ -26,6 +26,7 @@ Contents: ...@@ -26,6 +26,7 @@ Contents:
modules/tensorpack.train modules/tensorpack.train
modules/tensorpack.utils modules/tensorpack.utils
modules/tensorpack.tfutils modules/tensorpack.tfutils
modules/tensorpack.predict
modules/tensorpack.RL modules/tensorpack.RL
......
tensorpack
==========
.. toctree::
:maxdepth: 10
tensorpack
tensorpack.RL package tensorpack.RL package
===================== =====================
Submodules
----------
tensorpack.RL.common module
---------------------------
.. automodule:: tensorpack.RL.common
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.envbase module
----------------------------
.. automodule:: tensorpack.RL.envbase
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.expreplay module
------------------------------
.. automodule:: tensorpack.RL.expreplay
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.gymenv module
---------------------------
.. automodule:: tensorpack.RL.gymenv
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.history module
----------------------------
.. automodule:: tensorpack.RL.history
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.simulator module
------------------------------
.. automodule:: tensorpack.RL.simulator
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.RL .. automodule:: tensorpack.RL
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack.callbacks package tensorpack.callbacks package
============================ ============================
Submodules
----------
tensorpack.callbacks.base module
--------------------------------
.. automodule:: tensorpack.callbacks.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.concurrency module
---------------------------------------
.. automodule:: tensorpack.callbacks.concurrency
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.dispatcher module
--------------------------------------
.. automodule:: tensorpack.callbacks.dispatcher
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.dump module
--------------------------------
.. automodule:: tensorpack.callbacks.dump
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.graph module
---------------------------------
.. automodule:: tensorpack.callbacks.graph
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.group module
---------------------------------
.. automodule:: tensorpack.callbacks.group
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.inference module
-------------------------------------
.. automodule:: tensorpack.callbacks.inference
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.param module
---------------------------------
.. automodule:: tensorpack.callbacks.param
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.saver module
---------------------------------
.. automodule:: tensorpack.callbacks.saver
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.stats module
---------------------------------
.. automodule:: tensorpack.callbacks.stats
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.callbacks .. automodule:: tensorpack.callbacks
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack.dataflow.dataset package tensorpack.dataflow.dataset package
=================================== ===================================
Submodules
----------
tensorpack.dataflow.dataset.bsds500 module
------------------------------------------
.. automodule:: tensorpack.dataflow.dataset.bsds500
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.cifar module
----------------------------------------
.. automodule:: tensorpack.dataflow.dataset.cifar
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.ilsvrc module
-----------------------------------------
.. automodule:: tensorpack.dataflow.dataset.ilsvrc
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.mnist module
----------------------------------------
.. automodule:: tensorpack.dataflow.dataset.mnist
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.ptb module
--------------------------------------
.. automodule:: tensorpack.dataflow.dataset.ptb
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.svhn module
---------------------------------------
.. automodule:: tensorpack.dataflow.dataset.svhn
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.visualqa module
-------------------------------------------
.. automodule:: tensorpack.dataflow.dataset.visualqa
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.dataflow.dataset .. automodule:: tensorpack.dataflow.dataset
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack.dataflow.imgaug package tensorpack.dataflow.imgaug package
================================== ==================================
Submodules
----------
tensorpack.dataflow.imgaug.base module
--------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.crop module
--------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.crop
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.deform module
----------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.deform
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.geometry module
------------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.geometry
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.imgproc module
-----------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.imgproc
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.meta module
--------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.meta
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.noise module
---------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.noise
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.noname module
----------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.noname
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.imgaug.paste module
---------------------------------------
.. automodule:: tensorpack.dataflow.imgaug.paste
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.dataflow.imgaug .. automodule:: tensorpack.dataflow.imgaug
:members: :members:
:undoc-members: :undoc-members:
......
...@@ -9,25 +9,6 @@ Subpackages ...@@ -9,25 +9,6 @@ Subpackages
tensorpack.dataflow.dataset tensorpack.dataflow.dataset
tensorpack.dataflow.imgaug tensorpack.dataflow.imgaug
Submodules
----------
tensorpack.dataflow.base module
-------------------------------
.. automodule:: tensorpack.dataflow.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.common module
---------------------------------
.. automodule:: tensorpack.dataflow.common
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dftools module tensorpack.dataflow.dftools module
---------------------------------- ----------------------------------
...@@ -36,55 +17,6 @@ tensorpack.dataflow.dftools module ...@@ -36,55 +17,6 @@ tensorpack.dataflow.dftools module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.dataflow.format module
---------------------------------
.. automodule:: tensorpack.dataflow.format
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.image module
--------------------------------
.. automodule:: tensorpack.dataflow.image
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.prefetch module
-----------------------------------
.. automodule:: tensorpack.dataflow.prefetch
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.raw module
------------------------------
.. automodule:: tensorpack.dataflow.raw
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.remote module
---------------------------------
.. automodule:: tensorpack.dataflow.remote
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.tf_func module
----------------------------------
.. automodule:: tensorpack.dataflow.tf_func
:members:
:undoc-members:
:show-inheritance:
Module contents Module contents
--------------- ---------------
......
tensorpack.models package tensorpack.models package
========================= =========================
Submodules
----------
tensorpack.models.batch_norm module
-----------------------------------
.. automodule:: tensorpack.models.batch_norm
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.conv2d module
-------------------------------
.. automodule:: tensorpack.models.conv2d
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.fc module
---------------------------
.. automodule:: tensorpack.models.fc
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.image_sample module
-------------------------------------
.. automodule:: tensorpack.models.image_sample
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.model_desc module
-----------------------------------
.. automodule:: tensorpack.models.model_desc
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.nonlin module
-------------------------------
.. automodule:: tensorpack.models.nonlin
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.pool module
-----------------------------
.. automodule:: tensorpack.models.pool
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.regularize module
-----------------------------------
.. automodule:: tensorpack.models.regularize
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.shapes module
-------------------------------
.. automodule:: tensorpack.models.shapes
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.softmax module
--------------------------------
.. automodule:: tensorpack.models.softmax
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.models .. automodule:: tensorpack.models
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack.predict package tensorpack.predict package
========================== ==========================
Submodules
----------
tensorpack.predict.base module
------------------------------
.. automodule:: tensorpack.predict.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.predict.common module
--------------------------------
.. automodule:: tensorpack.predict.common
:members:
:undoc-members:
:show-inheritance:
tensorpack.predict.concurrency module
-------------------------------------
.. automodule:: tensorpack.predict.concurrency
:members:
:undoc-members:
:show-inheritance:
tensorpack.predict.dataset module
---------------------------------
.. automodule:: tensorpack.predict.dataset
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.predict .. automodule:: tensorpack.predict
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack package
==================
Subpackages
-----------
.. toctree::
tensorpack.RL
tensorpack.callbacks
tensorpack.dataflow
tensorpack.models
tensorpack.predict
tensorpack.tfutils
tensorpack.train
tensorpack.utils
Module contents
---------------
.. automodule:: tensorpack
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils package tensorpack.tfutils package
========================== ==========================
Submodules
----------
tensorpack.tfutils.argscope module
----------------------------------
.. automodule:: tensorpack.tfutils.argscope
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.common module
--------------------------------
.. automodule:: tensorpack.tfutils.common
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.gradproc module
----------------------------------
.. automodule:: tensorpack.tfutils.gradproc
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.modelutils module tensorpack.tfutils.modelutils module
------------------------------------ ------------------------------------
...@@ -36,14 +9,6 @@ tensorpack.tfutils.modelutils module ...@@ -36,14 +9,6 @@ tensorpack.tfutils.modelutils module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.tfutils.sessinit module
----------------------------------
.. automodule:: tensorpack.tfutils.sessinit
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.summary module tensorpack.tfutils.summary module
--------------------------------- ---------------------------------
...@@ -60,14 +25,6 @@ tensorpack.tfutils.symbolic_functions module ...@@ -60,14 +25,6 @@ tensorpack.tfutils.symbolic_functions module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.tfutils.tower module
-------------------------------
.. automodule:: tensorpack.tfutils.tower
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.varmanip module tensorpack.tfutils.varmanip module
---------------------------------- ----------------------------------
......
tensorpack.train package tensorpack.train package
======================== ========================
Submodules
----------
tensorpack.train.base module
----------------------------
.. automodule:: tensorpack.train.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.config module
------------------------------
.. automodule:: tensorpack.train.config
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.input_data module
----------------------------------
.. automodule:: tensorpack.train.input_data
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.multigpu module
--------------------------------
.. automodule:: tensorpack.train.multigpu
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.queue module
-----------------------------
.. automodule:: tensorpack.train.queue
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.trainer module
-------------------------------
.. automodule:: tensorpack.train.trainer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorpack.train .. automodule:: tensorpack.train
:members: :members:
:undoc-members: :undoc-members:
......
tensorpack.utils package tensorpack.utils package
======================== ========================
Submodules
----------
tensorpack.utils.argtools module tensorpack.utils.argtools module
-------------------------------- --------------------------------
...@@ -52,14 +49,6 @@ tensorpack.utils.globvars module ...@@ -52,14 +49,6 @@ tensorpack.utils.globvars module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.utils.gpu module
---------------------------
.. automodule:: tensorpack.utils.gpu
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.loadcaffe module tensorpack.utils.loadcaffe module
--------------------------------- ---------------------------------
...@@ -84,13 +73,6 @@ tensorpack.utils.lut module ...@@ -84,13 +73,6 @@ tensorpack.utils.lut module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.utils.naming module
------------------------------
.. automodule:: tensorpack.utils.naming
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.rect module tensorpack.utils.rect module
---------------------------- ----------------------------
...@@ -124,14 +106,6 @@ tensorpack.utils.timer module ...@@ -124,14 +106,6 @@ tensorpack.utils.timer module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
tensorpack.utils.utils module
-----------------------------
.. automodule:: tensorpack.utils.utils
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.viz module tensorpack.utils.viz module
--------------------------- ---------------------------
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
# Author: Yuxin Wu <ppwwyyxxc@gmail.com> # Author: Yuxin Wu <ppwwyyxxc@gmail.com>
make clean make clean
sphinx-apidoc -o modules ../tensorpack -f -d 10 #sphinx-apidoc -o modules ../tensorpack -f -d 10
make html make html
...@@ -7,12 +7,14 @@ import importlib ...@@ -7,12 +7,14 @@ import importlib
import os import os
import os.path import os.path
__all__ = []
def _global_import(name): def _global_import(name):
p = __import__(name, globals(), locals(), level=1) p = __import__(name, globals(), locals(), level=1)
lst = p.__all__ if '__all__' in dir(p) else dir(p) lst = p.__all__ if '__all__' in dir(p) else dir(p)
del globals()[name] del globals()[name]
for k in lst: for k in lst:
globals()[k] = p.__dict__[k] globals()[k] = p.__dict__[k]
__all__.append(k)
for _, module_name, _ in walk_packages( for _, module_name, _ in walk_packages(
[os.path.dirname(__file__)]): [os.path.dirname(__file__)]):
......
...@@ -19,9 +19,9 @@ class PreventStuckPlayer(ProxyPlayer): ...@@ -19,9 +19,9 @@ class PreventStuckPlayer(ProxyPlayer):
# TODO hash the state as well? # TODO hash the state as well?
def __init__(self, player, nr_repeat, action): def __init__(self, player, nr_repeat, action):
""" """
It does auto-reset, but doesn't auto-restart the underlying player.
:param nr_repeat: trigger the 'action' after this many of repeated action :param nr_repeat: trigger the 'action' after this many of repeated action
:param action: the action to be triggered to get out of stuck :param action: the action to be triggered to get out of stuck
Does auto-reset, but doesn't auto-restart the underlying player.
""" """
super(PreventStuckPlayer, self).__init__(player) super(PreventStuckPlayer, self).__init__(player)
self.act_que = deque(maxlen=nr_repeat) self.act_que = deque(maxlen=nr_repeat)
......
...@@ -10,12 +10,15 @@ import os.path ...@@ -10,12 +10,15 @@ import os.path
from . import dataset from . import dataset
from . import imgaug from . import imgaug
__all__ = []
def _global_import(name): def _global_import(name):
p = __import__(name, globals(), locals(), level=1) p = __import__(name, globals(), locals(), level=1)
lst = p.__all__ if '__all__' in dir(p) else dir(p) lst = p.__all__ if '__all__' in dir(p) else dir(p)
del globals()[name] del globals()[name]
for k in lst: for k in lst:
globals()[k] = p.__dict__[k] globals()[k] = p.__dict__[k]
__all__.append(k)
__SKIP = ['dftools', 'dataset', 'imgaug'] __SKIP = ['dftools', 'dataset', 'imgaug']
for _, module_name, _ in walk_packages( for _, module_name, _ in walk_packages(
......
...@@ -6,11 +6,14 @@ from pkgutil import walk_packages ...@@ -6,11 +6,14 @@ from pkgutil import walk_packages
import os import os
import os.path import os.path
__all__ = []
def global_import(name): def global_import(name):
p = __import__(name, globals(), locals(), level=1) p = __import__(name, globals(), locals(), level=1)
lst = p.__all__ if '__all__' in dir(p) else dir(p) lst = p.__all__ if '__all__' in dir(p) else dir(p)
del globals()[name]
for k in lst: for k in lst:
globals()[k] = p.__dict__[k] globals()[k] = p.__dict__[k]
__all__.append(k)
for _, module_name, _ in walk_packages( for _, module_name, _ in walk_packages(
[os.path.dirname(__file__)]): [os.path.dirname(__file__)]):
......
...@@ -13,6 +13,7 @@ def global_import(name): ...@@ -13,6 +13,7 @@ def global_import(name):
del globals()[name] del globals()[name]
for k in lst: for k in lst:
globals()[k] = p.__dict__[k] globals()[k] = p.__dict__[k]
__all__.append(k)
for _, module_name, _ in walk_packages( for _, module_name, _ in walk_packages(
[os.path.dirname(__file__)]): [os.path.dirname(__file__)]):
......
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