Browse Source

build docs in Sphinx.

tags/v0.1.0-Tensor
Oceania2018 6 years ago
parent
commit
1956cf997d
20 changed files with 299 additions and 5 deletions
  1. +1
    -0
      .gitignore
  2. +19
    -0
      docs/Makefile
  3. BIN
      docs/assets/Cover.psd
  4. +35
    -0
      docs/make.bat
  5. +0
    -0
      docs/source/Constant.md
  6. +0
    -0
      docs/source/Foreword.md
  7. +18
    -2
      docs/source/FrontCover.md
  8. +0
    -0
      docs/source/Graph.md
  9. +14
    -0
      docs/source/HelloWorld.md
  10. +0
    -0
      docs/source/Operation.md
  11. +0
    -0
      docs/source/Preface.md
  12. +0
    -0
      docs/source/Session.md
  13. +3
    -1
      docs/source/Table of Contents.md
  14. +2
    -2
      docs/source/Tensor.md
  15. +0
    -0
      docs/source/Variable.md
  16. BIN
      docs/source/_static/Cover.jpg
  17. +0
    -0
      docs/source/_static/column-major-order.png
  18. +0
    -0
      docs/source/_static/row-major-order.png
  19. +179
    -0
      docs/source/conf.py
  20. +28
    -0
      docs/source/index.rst

+ 1
- 0
.gitignore View File

@@ -334,3 +334,4 @@ ASALocalRun/
/tensorflowlib/linux/native/libtensorflow_framework.so
/tensorflowlib/linux/native/libtensorflow.so
/src/TensorFlowNET.Core/tensorflow.dll
/docs/build

+ 19
- 0
docs/Makefile View File

@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

BIN
docs/assets/Cover.psd View File


+ 35
- 0
docs/make.bat View File

@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd

docs/The-Definitive-Guide/CH_2 Constant.md → docs/source/Constant.md View File


docs/The-Definitive-Guide/Foreword.md → docs/source/Foreword.md View File


docs/The-Definitive-Guide/README.md → docs/source/FrontCover.md View File

@@ -4,8 +4,24 @@



### The CSharp binding for Google's TensorFlow - An Open Source Machine Learning Framework for Everyone
### 谷歌TensorFlow的C#封装库,开源机器学习框架。





![column-major order](_static/cover.jpg)





### The CSharp binding for Google's TensorFlow

#### An Open Source Machine Learning Framework for Everyone

### 谷歌TensorFlow的C#封装库

#### 开源机器学习框架。




docs/The-Definitive-Guide/CH_3 Operation.md → docs/source/Graph.md View File


+ 14
- 0
docs/source/HelloWorld.md View File

@@ -0,0 +1,14 @@
# Get started with TensorFlow.NET

让我们先运行一个经典的HelloWorld程序,看看TensorFlow是在.NET上面运行的效果,我想不出有比做个HelloWorld再简单的方式了。

Let's run a classic HelloWorld program first and see if TensorFlow is running on .NET. I can't think of a simpler way to be a HelloWorld.

### Install the TensorFlow.NET SDK

To start building TensorFlow program you just need to download and install the .NET SDK (Software Development Kit).

```cmd
PM> Install-Package TensorFlow.NET
```


docs/The-Definitive-Guide/CH_4 Variable.md → docs/source/Operation.md View File


docs/The-Definitive-Guide/Preface.md → docs/source/Preface.md View File


docs/The-Definitive-Guide/CH_5 Session.md → docs/source/Session.md View File


docs/The-Definitive-Guide/Table of Contents.md → docs/source/Table of Contents.md View File

@@ -10,7 +10,9 @@

​ Installing Tensorflow.NET
​ Running Tensorflow.NET
​ Talking to Tensorflow.NET
​ Talking to Tensorflow.NET

##### 2. Hello World

## Part II. Tensorflow.NET in Depth


docs/The-Definitive-Guide/CH_1 Tensor.md → docs/source/Tensor.md View File

@@ -36,6 +36,6 @@ var nd = np.array(1f, 2f, 3f, 4f, 5f, 6f).reshape(2, 3);



![column-major order](assets/column-major-order.png)
![column-major order](_static/column-major-order.png)

![row-major order](assets/row-major-order.png)
![row-major order](_static/row-major-order.png)

docs/The-Definitive-Guide/CH_6 Graph.md → docs/source/Variable.md View File


BIN
docs/source/_static/Cover.jpg View File

Before After
Width: 800  |  Height: 338  |  Size: 44 kB

docs/The-Definitive-Guide/assets/column-major-order.png → docs/source/_static/column-major-order.png View File


docs/The-Definitive-Guide/assets/row-major-order.png → docs/source/_static/row-major-order.png View File


+ 179
- 0
docs/source/conf.py View File

@@ -0,0 +1,179 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'TensorFlow.NET'
copyright = '2019, Haiping Chen'
author = 'Haiping Chen'

# The short X.Y version
version = '0.0.1'
# The full version, including alpha/beta/rc tags
release = '0.0.1'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.mathjax',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
from recommonmark.parser import CommonMarkParser
source_parsers = {'.md': CommonMarkParser}
source_suffix = ['.rst', '.md']

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'TensorFlowNETdoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'TensorFlowNET.tex', 'TensorFlow.NET Documentation',
'Haiping Chen', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'tensorflownet', 'TensorFlow.NET Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'TensorFlowNET', 'TensorFlow.NET Documentation',
author, 'TensorFlowNET', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

+ 28
- 0
docs/source/index.rst View File

@@ -0,0 +1,28 @@
.. TensorFlow.NET documentation master file, created by
sphinx-quickstart on Sat Jan 5 09:26:55 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to TensorFlow.NET's documentation!
==========================================

.. toctree::
:maxdepth: 2
:caption: Contents:



Indices and tables
==================

* :ref:`Front Cover <front-cover>`
* :ref:`modindex`
* :ref:`search`

.. _front-cover:

.. toctree::
:maxdepth: 3
:caption: Get Started with TensorFlow.NET:

FrontCover

Loading…
Cancel
Save