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
99a8ee54
Commit
99a8ee54
authored
Dec 09, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
a979a3f3
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
172 additions
and
24 deletions
+172
-24
docs/conf.py
docs/conf.py
+13
-2
docs/modules/tensorpack.RL.rst
docs/modules/tensorpack.RL.rst
+8
-8
docs/modules/tensorpack.callbacks.rst
docs/modules/tensorpack.callbacks.rst
+22
-6
docs/modules/tensorpack.dataflow.dataset.rst
docs/modules/tensorpack.dataflow.dataset.rst
+8
-0
docs/modules/tensorpack.dataflow.rst
docs/modules/tensorpack.dataflow.rst
+16
-0
docs/modules/tensorpack.models.rst
docs/modules/tensorpack.models.rst
+8
-0
docs/modules/tensorpack.predict.rst
docs/modules/tensorpack.predict.rst
+8
-0
docs/modules/tensorpack.tfutils.rst
docs/modules/tensorpack.tfutils.rst
+24
-0
docs/modules/tensorpack.train.rst
docs/modules/tensorpack.train.rst
+16
-0
docs/modules/tensorpack.utils.rst
docs/modules/tensorpack.utils.rst
+43
-3
examples/GAN/DCGAN-CelebA.py
examples/GAN/DCGAN-CelebA.py
+2
-2
tensorpack/RL/gymenv.py
tensorpack/RL/gymenv.py
+3
-2
tensorpack/dataflow/prefetch.py
tensorpack/dataflow/prefetch.py
+1
-1
No files found.
docs/conf.py
View file @
99a8ee54
...
...
@@ -34,11 +34,22 @@ import mock
#', '.join(map(str, args)) + ', ' \
#+ ', '.join(["{}={}".format(k,v) for k,v in kwargs.items()]) + ')'
MOCK_MODULES
=
[
'scipy'
,
'tensorflow'
,
'scipy.misc'
,
'h5py'
,
'nltk'
,
MOCK_MODULES
=
[
'scipy'
,
'tensorflow'
,
'tensorflow.contrib'
,
'tensorflow.contrib.framework'
,
'tensorflow.models'
,
'tensorflow.models.rnn'
,
'tensorflow.models.rnn.ptb'
,
'tensorflow.python'
,
'tensorflow.python.training'
,
'sklearn.datasets'
,
'scipy.misc'
,
'h5py'
,
'nltk'
,
'cv2'
,
'scipy.io'
,
'dill'
,
'zmq'
,
'subprocess32'
,
'lmdb'
,
'tornado.concurrent'
,
'tornado'
,
'msgpack'
,
'msgpack_numpy'
,
'ale_python_interface'
]
'tornado'
,
'msgpack'
,
'msgpack_numpy'
,
'ale_python_interface'
,
'sklearn'
]
for
mod_name
in
MOCK_MODULES
:
sys
.
modules
[
mod_name
]
=
mock
.
Mock
(
name
=
mod_name
)
sys
.
modules
[
'tensorflow'
]
.
__version__
=
'0.12.0'
import
tensorpack
from
tensorpack.models
import
*
...
...
docs/modules/tensorpack.RL.rst
View file @
99a8ee54
...
...
@@ -4,14 +4,6 @@ tensorpack.RL package
Submodules
----------
tensorpack.RL.atari module
--------------------------
.. automodule:: tensorpack.RL.atari
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.common module
---------------------------
...
...
@@ -36,6 +28,14 @@ tensorpack.RL.expreplay module
:undoc-members:
:show-inheritance:
tensorpack.RL.gymenv module
---------------------------
.. automodule:: tensorpack.RL.gymenv
:members:
:undoc-members:
:show-inheritance:
tensorpack.RL.history module
----------------------------
...
...
docs/modules/tensorpack.callbacks.rst
View file @
99a8ee54
...
...
@@ -12,10 +12,18 @@ tensorpack.callbacks.base module
:undoc-members:
:show-inheritance:
tensorpack.callbacks.co
mmon
module
----------------------------------
tensorpack.callbacks.co
ncurrency
module
----------------------------------
-----
.. automodule:: tensorpack.callbacks.common
.. automodule:: tensorpack.callbacks.concurrency
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.dispatcher module
--------------------------------------
.. automodule:: tensorpack.callbacks.dispatcher
:members:
:undoc-members:
:show-inheritance:
...
...
@@ -60,10 +68,18 @@ tensorpack.callbacks.param module
:undoc-members:
:show-inheritance:
tensorpack.callbacks.summary module
-----------------------------------
tensorpack.callbacks.saver module
---------------------------------
.. automodule:: tensorpack.callbacks.saver
:members:
:undoc-members:
:show-inheritance:
tensorpack.callbacks.stats module
---------------------------------
.. automodule:: tensorpack.callbacks.s
ummary
.. automodule:: tensorpack.callbacks.s
tats
:members:
:undoc-members:
:show-inheritance:
...
...
docs/modules/tensorpack.dataflow.dataset.rst
View file @
99a8ee54
...
...
@@ -36,6 +36,14 @@ tensorpack.dataflow.dataset.mnist module
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.ptb module
--------------------------------------
.. automodule:: tensorpack.dataflow.dataset.ptb
:members:
:undoc-members:
:show-inheritance:
tensorpack.dataflow.dataset.svhn module
---------------------------------------
...
...
docs/modules/tensorpack.dataflow.rst
View file @
99a8ee54
...
...
@@ -68,6 +68,22 @@ tensorpack.dataflow.raw module
: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
---------------
...
...
docs/modules/tensorpack.models.rst
View file @
99a8ee54
...
...
@@ -68,6 +68,14 @@ tensorpack.models.regularize module
:undoc-members:
:show-inheritance:
tensorpack.models.shapes module
-------------------------------
.. automodule:: tensorpack.models.shapes
:members:
:undoc-members:
:show-inheritance:
tensorpack.models.softmax module
--------------------------------
...
...
docs/modules/tensorpack.predict.rst
View file @
99a8ee54
...
...
@@ -4,6 +4,14 @@ tensorpack.predict package
Submodules
----------
tensorpack.predict.base module
------------------------------
.. automodule:: tensorpack.predict.base
:members:
:undoc-members:
:show-inheritance:
tensorpack.predict.common module
--------------------------------
...
...
docs/modules/tensorpack.tfutils.rst
View file @
99a8ee54
...
...
@@ -60,6 +60,30 @@ tensorpack.tfutils.symbolic_functions module
:undoc-members:
:show-inheritance:
tensorpack.tfutils.tower module
-------------------------------
.. automodule:: tensorpack.tfutils.tower
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.varmanip module
----------------------------------
.. automodule:: tensorpack.tfutils.varmanip
:members:
:undoc-members:
:show-inheritance:
tensorpack.tfutils.varreplace module
------------------------------------
.. automodule:: tensorpack.tfutils.varreplace
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
...
...
docs/modules/tensorpack.train.rst
View file @
99a8ee54
...
...
@@ -20,6 +20,14 @@ tensorpack.train.config module
:undoc-members:
:show-inheritance:
tensorpack.train.input_data module
----------------------------------
.. automodule:: tensorpack.train.input_data
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.multigpu module
--------------------------------
...
...
@@ -28,6 +36,14 @@ tensorpack.train.multigpu module
:undoc-members:
:show-inheritance:
tensorpack.train.queue module
-----------------------------
.. automodule:: tensorpack.train.queue
:members:
:undoc-members:
:show-inheritance:
tensorpack.train.trainer module
-------------------------------
...
...
docs/modules/tensorpack.utils.rst
View file @
99a8ee54
...
...
@@ -4,6 +4,14 @@ tensorpack.utils package
Submodules
----------
tensorpack.utils.argtools module
--------------------------------
.. automodule:: tensorpack.utils.argtools
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.concurrency module
-----------------------------------
...
...
@@ -12,6 +20,14 @@ tensorpack.utils.concurrency module
:undoc-members:
:show-inheritance:
tensorpack.utils.debug module
-----------------------------
.. automodule:: tensorpack.utils.debug
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.discretize module
----------------------------------
...
...
@@ -28,6 +44,22 @@ tensorpack.utils.fs module
:undoc-members:
:show-inheritance:
tensorpack.utils.globvars module
--------------------------------
.. automodule:: tensorpack.utils.globvars
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.gpu module
---------------------------
.. automodule:: tensorpack.utils.gpu
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.loadcaffe module
---------------------------------
...
...
@@ -76,10 +108,10 @@ tensorpack.utils.serialize module
:undoc-members:
:show-inheritance:
tensorpack.utils.stat module
----------------------------
tensorpack.utils.stat
s
module
----------------------------
-
.. automodule:: tensorpack.utils.stat
.. automodule:: tensorpack.utils.stat
s
:members:
:undoc-members:
:show-inheritance:
...
...
@@ -100,6 +132,14 @@ tensorpack.utils.utils module
:undoc-members:
:show-inheritance:
tensorpack.utils.viz module
---------------------------
.. automodule:: tensorpack.utils.viz
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
...
...
examples/GAN/DCGAN-CelebA.py
View file @
99a8ee54
...
...
@@ -41,7 +41,7 @@ class Model(ModelDesc):
l
=
FullyConnected
(
'fc0'
,
z
,
64
*
8
*
4
*
4
,
nl
=
tf
.
identity
)
l
=
tf
.
reshape
(
l
,
[
-
1
,
4
,
4
,
64
*
8
])
l
=
BNReLU
(
l
)
with
argscope
(
Deconv2D
,
nl
=
BNReLU
,
kernel_shape
=
5
,
stride
=
2
):
with
argscope
(
Deconv2D
,
nl
=
BNReLU
,
kernel_shape
=
4
,
stride
=
2
):
l
=
Deconv2D
(
'deconv1'
,
l
,
[
8
,
8
,
64
*
4
])
l
=
Deconv2D
(
'deconv2'
,
l
,
[
16
,
16
,
64
*
2
])
l
=
Deconv2D
(
'deconv3'
,
l
,
[
32
,
32
,
64
])
...
...
@@ -51,7 +51,7 @@ class Model(ModelDesc):
def
discriminator
(
self
,
imgs
):
""" return a (b, 1) logits"""
with
argscope
(
Conv2D
,
nl
=
tf
.
identity
,
kernel_shape
=
5
,
stride
=
2
),
\
with
argscope
(
Conv2D
,
nl
=
tf
.
identity
,
kernel_shape
=
4
,
stride
=
2
),
\
argscope
(
LeakyReLU
,
alpha
=
0.2
):
l
=
(
LinearWrap
(
imgs
)
.
Conv2D
(
'conv0'
,
64
,
nl
=
LeakyReLU
)
...
...
tensorpack/RL/gymenv.py
View file @
99a8ee54
...
...
@@ -24,14 +24,15 @@ from ..utils.stats import StatCounter
from
.envbase
import
RLEnvironment
,
DiscreteActionSpace
_
ALE
_LOCK
=
threading
.
Lock
()
_
ENV
_LOCK
=
threading
.
Lock
()
class
GymEnv
(
RLEnvironment
):
"""
An OpenAI/gym wrapper. Can optionally auto restart.
Only support discrete action space now
"""
def
__init__
(
self
,
name
,
dumpdir
=
None
,
viz
=
False
,
auto_restart
=
True
):
with
_
ALE
_LOCK
:
with
_
ENV
_LOCK
:
self
.
gymenv
=
gym
.
make
(
name
)
if
dumpdir
:
mkdir_p
(
dumpdir
)
...
...
tensorpack/dataflow/prefetch.py
View file @
99a8ee54
...
...
@@ -106,7 +106,7 @@ class PrefetchProcessZMQ(mp.Process):
self
.
ds
.
reset_state
()
self
.
context
=
zmq
.
Context
()
self
.
socket
=
self
.
context
.
socket
(
zmq
.
PUSH
)
self
.
socket
.
set_hwm
(
1
)
self
.
socket
.
set_hwm
(
5
)
self
.
socket
.
connect
(
self
.
conn_name
)
while
True
:
for
dp
in
self
.
ds
.
get_data
():
...
...
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