Skip to content

Commit b4f4ffd

Browse files
author
Johannes Ballé
committed
Added simple Sphinx configuration.
1 parent 4976f19 commit b4f4ffd

File tree

4 files changed

+282
-1
lines changed

4 files changed

+282
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
/docs/_build
12
.DS_Store
23
*.pyc
34
*.so
4-
*.*~
5+
*~

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = tensorflow_compression
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/master/config
8+
9+
from __future__ import unicode_literals
10+
11+
# -- Path setup --------------------------------------------------------------
12+
13+
# If extensions (or modules to document with autodoc) are in another directory,
14+
# add these directories to sys.path here. If the directory is relative to the
15+
# documentation root, use os.path.abspath to make it absolute, like shown here.
16+
#
17+
import os
18+
import sys
19+
sys.path.insert(0, os.path.abspath('..'))
20+
21+
22+
# -- Project information -----------------------------------------------------
23+
24+
project = 'tensorflow_compression'
25+
copyright = '2018 Google LLC'
26+
author = 'Johannes Ballé, Sung Jin Hwang, Nick Johnston'
27+
28+
# The short X.Y version
29+
version = ''
30+
# The full version, including alpha/beta/rc tags
31+
release = ''
32+
33+
34+
# -- General configuration ---------------------------------------------------
35+
36+
# If your documentation needs a minimal Sphinx version, state it here.
37+
#
38+
# needs_sphinx = '1.0'
39+
40+
# Add any Sphinx extension module names here, as strings. They can be
41+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
42+
# ones.
43+
extensions = [
44+
'sphinx.ext.autodoc',
45+
'sphinx.ext.githubpages',
46+
'sphinx.ext.napoleon',
47+
]
48+
49+
# Add any paths that contain templates here, relative to this directory.
50+
templates_path = ['_templates']
51+
52+
# The suffix(es) of source filenames.
53+
# You can specify multiple suffix as a list of string:
54+
#
55+
# source_suffix = ['.rst', '.md']
56+
source_suffix = '.rst'
57+
58+
# The master toctree document.
59+
master_doc = 'index'
60+
61+
# The language for content autogenerated by Sphinx. Refer to documentation
62+
# for a list of supported languages.
63+
#
64+
# This is also used if you do content translation via gettext catalogs.
65+
# Usually you set "language" from the command line for these cases.
66+
language = None
67+
68+
# List of patterns, relative to source directory, that match files and
69+
# directories to ignore when looking for source files.
70+
# This pattern also affects html_static_path and html_extra_path .
71+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
72+
73+
# The name of the Pygments (syntax highlighting) style to use.
74+
pygments_style = 'sphinx'
75+
76+
77+
# -- Options for HTML output -------------------------------------------------
78+
79+
# The theme to use for HTML and HTML Help pages. See the documentation for
80+
# a list of builtin themes.
81+
#
82+
html_theme = 'sphinx_rtd_theme'
83+
84+
# Theme options are theme-specific and customize the look and feel of a theme
85+
# further. For a list of options available for each theme, see the
86+
# documentation.
87+
#
88+
html_theme_options = {
89+
'canonical_url': '',
90+
'analytics_id': '',
91+
'logo_only': False,
92+
'display_version': True,
93+
'prev_next_buttons_location': 'bottom',
94+
'style_external_links': False,
95+
# Toc options
96+
'collapse_navigation': True,
97+
'sticky_navigation': True,
98+
'navigation_depth': 4,
99+
'includehidden': False,
100+
'titles_only': False,
101+
}
102+
103+
# Add any paths that contain custom static files (such as style sheets) here,
104+
# relative to this directory. They are copied after the builtin static files,
105+
# so a file named "default.css" will overwrite the builtin "default.css".
106+
html_static_path = ['_static']
107+
108+
# Custom sidebar templates, must be a dictionary that maps document names
109+
# to template names.
110+
#
111+
# The default sidebars (for documents that don't match any pattern) are
112+
# defined by theme itself. Builtin themes are using these templates by
113+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
114+
# 'searchbox.html']``.
115+
#
116+
# html_sidebars = {}
117+
118+
119+
# -- Options for HTMLHelp output ---------------------------------------------
120+
121+
# Output file base name for HTML help builder.
122+
htmlhelp_basename = 'tensorflow_compressiondoc'
123+
124+
125+
# -- Options for LaTeX output ------------------------------------------------
126+
127+
latex_elements = {
128+
# The paper size ('letterpaper' or 'a4paper').
129+
#
130+
# 'papersize': 'letterpaper',
131+
132+
# The font size ('10pt', '11pt' or '12pt').
133+
#
134+
# 'pointsize': '10pt',
135+
136+
# Additional stuff for the LaTeX preamble.
137+
#
138+
# 'preamble': '',
139+
140+
# Latex figure (float) alignment
141+
#
142+
# 'figure_align': 'htbp',
143+
}
144+
145+
# Grouping the document tree into LaTeX files. List of tuples
146+
# (source start file, target name, title,
147+
# author, documentclass [howto, manual, or own class]).
148+
latex_documents = [
149+
(master_doc, 'tensorflow_compression.tex', 'tensorflow_compression Documentation',
150+
'Johannes Ballé, Sung Jin Hwang, Nick Johnston', 'manual'),
151+
]
152+
153+
154+
# -- Options for manual page output ------------------------------------------
155+
156+
# One entry per manual page. List of tuples
157+
# (source start file, name, description, authors, manual section).
158+
man_pages = [
159+
(master_doc, 'tensorflow_compression', 'tensorflow_compression Documentation',
160+
[author], 1)
161+
]
162+
163+
164+
# -- Options for Texinfo output ----------------------------------------------
165+
166+
# Grouping the document tree into Texinfo files. List of tuples
167+
# (source start file, target name, title, author,
168+
# dir menu entry, description, category)
169+
texinfo_documents = [
170+
(master_doc, 'tensorflow_compression', 'tensorflow_compression Documentation',
171+
author, 'tensorflow_compression', 'One line description of project.',
172+
'Miscellaneous'),
173+
]
174+
175+
176+
# -- Extension configuration -------------------------------------------------
177+
178+
autodoc_default_flags = ['inherited-members', 'imported-members']

docs/index.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
.. py:module:: tensorflow_compression
2+
3+
.. toctree::
4+
:caption: Table of Contents
5+
:collapse: False
6+
:maxdepth: 4
7+
8+
9+
Keras layers
10+
============
11+
12+
Entropy models
13+
--------------
14+
15+
EntropyBottleneck
16+
^^^^^^^^^^^^^^^^^
17+
.. autoclass:: EntropyBottleneck
18+
19+
Convolution
20+
-----------
21+
22+
SignalConv1D
23+
^^^^^^^^^^^^
24+
.. autoclass:: SignalConv1D
25+
26+
SignalConv2D
27+
^^^^^^^^^^^^
28+
.. autoclass:: SignalConv2D
29+
30+
SignalConv3D
31+
^^^^^^^^^^^^
32+
.. autoclass:: SignalConv3D
33+
34+
Activation functions
35+
--------------------
36+
37+
GDN
38+
^^^
39+
.. autoclass:: GDN
40+
41+
Parameterizers
42+
--------------
43+
44+
These classes specify reparameterizations of variables created in Keras layers.
45+
46+
StaticParameterizer
47+
^^^^^^^^^^^^^^^^^^^
48+
.. autoclass:: StaticParameterizer
49+
50+
RDFTParameterizer
51+
^^^^^^^^^^^^^^^^^
52+
.. autoclass:: RDFTParameterizer
53+
54+
NonnegativeParameterizer
55+
^^^^^^^^^^^^^^^^^^^^^^^^
56+
.. autoclass:: NonnegativeParameterizer
57+
58+
59+
TensorFlow operations
60+
=====================
61+
62+
Range coding
63+
------------
64+
65+
pmf_to_quantized_cdf
66+
^^^^^^^^^^^^^^^^^^^^
67+
.. autofunction:: pmf_to_quantized_cdf
68+
69+
range_encode
70+
^^^^^^^^^^^^
71+
.. autofunction:: range_encode
72+
73+
range_decode
74+
^^^^^^^^^^^^
75+
.. autofunction:: range_decode
76+
77+
78+
Index & search
79+
==============
80+
81+
* :ref:`genindex`
82+
* :ref:`search`

0 commit comments

Comments
 (0)