Author: wangwei
Date: Wed May 9 15:25:26 2018
New Revision: 1831260
URL: http://svn.apache.org/viewvc?rev=1831260&view=rev
Log:
update instructions for windows
Added:
incubator/singa/site/trunk/en/_sources/docs/install_win.rst.txt
incubator/singa/site/trunk/en/docs/install_win.html
Modified:
incubator/singa/site/trunk/en/_sources/docs/install_macos1013.rst.txt
incubator/singa/site/trunk/en/_sources/docs/installation.md.txt
incubator/singa/site/trunk/en/_static/css/badge_only.css
incubator/singa/site/trunk/en/_static/css/theme.css
incubator/singa/site/trunk/en/_static/js/theme.js
incubator/singa/site/trunk/en/community/issue-tracking.html
incubator/singa/site/trunk/en/community/mail-lists.html
incubator/singa/site/trunk/en/community/source-repository.html
incubator/singa/site/trunk/en/community/team-list.html
incubator/singa/site/trunk/en/develop/contribute-code.html
incubator/singa/site/trunk/en/develop/contribute-docs.html
incubator/singa/site/trunk/en/develop/how-contribute.html
incubator/singa/site/trunk/en/develop/schedule.html
incubator/singa/site/trunk/en/docs.html
incubator/singa/site/trunk/en/docs/cnn.html
incubator/singa/site/trunk/en/docs/converter.html
incubator/singa/site/trunk/en/docs/data.html
incubator/singa/site/trunk/en/docs/dependencies.html
incubator/singa/site/trunk/en/docs/device.html
incubator/singa/site/trunk/en/docs/docker.html
incubator/singa/site/trunk/en/docs/image_tool.html
incubator/singa/site/trunk/en/docs/index.html
incubator/singa/site/trunk/en/docs/initializer.html
incubator/singa/site/trunk/en/docs/install_macos1013.html
incubator/singa/site/trunk/en/docs/installation.html
incubator/singa/site/trunk/en/docs/layer.html
incubator/singa/site/trunk/en/docs/loss.html
incubator/singa/site/trunk/en/docs/metric.html
incubator/singa/site/trunk/en/docs/model_zoo/caffe/README.html
incubator/singa/site/trunk/en/docs/model_zoo/char-rnn/README.html
incubator/singa/site/trunk/en/docs/model_zoo/cifar10/README.html
incubator/singa/site/trunk/en/docs/model_zoo/imagenet/alexnet/README.html
incubator/singa/site/trunk/en/docs/model_zoo/imagenet/googlenet/README.html
incubator/singa/site/trunk/en/docs/model_zoo/imagenet/inception/README.html
incubator/singa/site/trunk/en/docs/model_zoo/imagenet/resnet/README.html
incubator/singa/site/trunk/en/docs/model_zoo/imagenet/vgg/README.html
incubator/singa/site/trunk/en/docs/model_zoo/index.html
incubator/singa/site/trunk/en/docs/model_zoo/mnist/README.html
incubator/singa/site/trunk/en/docs/net.html
incubator/singa/site/trunk/en/docs/neural-net.html
incubator/singa/site/trunk/en/docs/notebook/README.html
incubator/singa/site/trunk/en/docs/optimizer.html
incubator/singa/site/trunk/en/docs/snapshot.html
incubator/singa/site/trunk/en/docs/software_stack.html
incubator/singa/site/trunk/en/docs/tensor.html
incubator/singa/site/trunk/en/docs/utils.html
incubator/singa/site/trunk/en/downloads.html
incubator/singa/site/trunk/en/genindex.html
incubator/singa/site/trunk/en/index.html
incubator/singa/site/trunk/en/objects.inv
incubator/singa/site/trunk/en/py-modindex.html
incubator/singa/site/trunk/en/releases/RELEASE_NOTES_0.1.0.html
incubator/singa/site/trunk/en/releases/RELEASE_NOTES_0.2.0.html
incubator/singa/site/trunk/en/releases/RELEASE_NOTES_0.3.0.html
incubator/singa/site/trunk/en/releases/RELEASE_NOTES_1.0.0.html
incubator/singa/site/trunk/en/releases/RELEASE_NOTES_1.1.0.html
incubator/singa/site/trunk/en/search.html
incubator/singa/site/trunk/en/searchindex.js
incubator/singa/site/trunk/zh/_static/css/badge_only.css
incubator/singa/site/trunk/zh/_static/css/theme.css
incubator/singa/site/trunk/zh/_static/js/theme.js
incubator/singa/site/trunk/zh/community/issue-tracking.html
incubator/singa/site/trunk/zh/community/mail-lists.html
incubator/singa/site/trunk/zh/community/source-repository.html
incubator/singa/site/trunk/zh/community/team-list.html
incubator/singa/site/trunk/zh/develop/contribute-code.html
incubator/singa/site/trunk/zh/develop/how-contribute.html
incubator/singa/site/trunk/zh/develop/schedule.html
incubator/singa/site/trunk/zh/docs.html
incubator/singa/site/trunk/zh/downloads.html
incubator/singa/site/trunk/zh/genindex.html
incubator/singa/site/trunk/zh/index.html
incubator/singa/site/trunk/zh/search.html
Modified: incubator/singa/site/trunk/en/_sources/docs/install_macos1013.rst.txt
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_sources/docs/install_macos1013.rst.txt?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_sources/docs/install_macos1013.rst.txt
(original)
+++ incubator/singa/site/trunk/en/_sources/docs/install_macos1013.rst.txt Wed
May 9 15:25:26 2018
@@ -1,3 +1,21 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+
Installing SINGA on macOS 13.10
===============================
Added: incubator/singa/site/trunk/en/_sources/docs/install_win.rst.txt
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_sources/docs/install_win.rst.txt?rev=1831260&view=auto
==============================================================================
--- incubator/singa/site/trunk/en/_sources/docs/install_win.rst.txt (added)
+++ incubator/singa/site/trunk/en/_sources/docs/install_win.rst.txt Wed May 9
15:25:26 2018
@@ -0,0 +1,178 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+
+Building SINGA on Windows
+=========================
+
+The process of building SINGA from source on Microsoft Windows has three
parts: install dependencies, build SINGA source, and (optionally) install the
python module.
+
+1. Install Dependencies
+----------------------
+
+You may create a folder for building the dependencies.
+
+The dependencies are:
+
+* Compiler and IDE
+ * Visual Studio. The community edition is free and can be used to build
SINGA. https://www.visualstudio.com/
+* CMake
+ * Can be downloaded from http://cmake.org/
+ * Make sure the path to cmake executable is in the system path, or use
full path when calling cmake.
+* SWIG
+ * Can be downloaded from http://swig.org/
+ * Make sure the path to swig executable is in the system path, or use
full path when calling swig. Use a recent version such as 3.0.12.
+
+* Protocol Buffers
+ * Download a suitable version such as 2.6.1:
https://github.com/google/protobuf/releases/tag/v2.6.1 .
+ * Download both protobuf-2.6.1.zip and protoc-2.6.1-win32.zip .
+ * Extract both of them in dependecies folder. Add the path to protoc
executable to the system path, or use full path when calling it.
+ * Open the Visual Studio solution which can be found in vsproject
folder.
+ * Change the build settings to Release and x64.
+ * build libprotobuf project.
+* Openblas
+ * Download a suitable source version such as 0.2.20 from
http://www.openblas.net
+ * Extract the source in the dependecies folder.
+ * If you don't have Perl installed, download a perl environment such as
Strawberry Perl (http://strawberryperl.com/)
+ * Build the Visual Studio solution by running this command in the
source folder:
+
+ .. code-block:: bash
+
+ cmake -G "Visual Studio 15 2017 Win64"
+
+ * Open the Visual Studio solution and change the build settings to
Release and x64.
+ * Build libopenblas project
+
+* Google glog
+ * Download a suitable version such as 0.3.5 from
https://github.com/google/glog/releases
+ * Extract the source in the dependencies folder.
+ * Open the Visual Studio solution.
+ * Change the build settings to Release and x64.
+ * Build libglog project
+
+2. Build SINGA source
+---------------------
+
+* Download SINGA source code
+* Compile the protobuf files:
+ * Goto src/proto folder
+
+.. code-block:: bash
+
+ mkdir python_out
+ protoc.exe *.proto --python_out python_out
+
+* Generate swig interfaces for C++ and Python:
+ Goto src/api
+
+.. code-block:: bash
+
+ swig -python -c++ singa.i
+
+* generate Visual Studio solution for SINGA:
+ Goto SINGA source code root folder
+
+.. code-block:: bash
+
+ mkdir build
+ cd build
+
+* Call cmake and add the paths in your system similar to the following example:
+
+.. code-block:: bash
+
+ cmake -G "Visual Studio 15 2017 Win64" ^
+ -DGLOG_INCLUDE_DIR="D:/WinSinga/dependencies/glog-0.3.5/src/windows" ^
+ -DGLOG_LIBRARIES="D:/WinSinga/dependencies/glog-0.3.5/x64/Release" ^
+
-DCBLAS_INCLUDE_DIR="D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include"
^
+
-DCBLAS_LIBRARIES="D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE" ^
+ -DProtobuf_INCLUDE_DIR="D:/WinSinga/dependencies/protobuf-2.6.1/src" ^
+
-DProtobuf_LIBRARIES="D:/WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release"
^
+
-DProtobuf_PROTOC_EXECUTABLE="D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe"
^
+ ..
+
+* Open the generated solution in Visual Studio
+* Change the build settings to Release and x64
+* Add the singa_wrap.cxx file from src/api to the singa_objects project
+* In the singa_objects project, open Additional Include Directories.
+* Add Python include path
+* Add numpy include path
+* Add protobuf include path
+* In the preprocessor definitions of the singa_objects project, add USE_GLOG
+* Build singa_objects project
+
+* In singa project:
+ * add singa_wrap.obj to Object Libraries
+ * change target name to _singa_wrap
+ * change target extension to .pyd
+ * change configuration type to Dynamic Library (.dll)
+ * goto Additional Library Directories and add the path to python,
openblas, protobuf and glog libraries
+ * goto Additional Dependencies and add libopenblas.lib, libglog.lib and
libprotobuf.lib
+
+* build singa project
+
+
+3. Install Python module
+------------------------
+
+* Change _singa_wrap.so to _singa_wrap.pyd in build/python/setup.py
+* Copy the files in src/proto/python_out to build/python/singa/proto
+
+* Optionally create and activate a virtual environment:
+
+.. code-block:: bash
+
+ mkdir SingaEnv
+ virtualenv SingaEnv
+ SingaEnv\Scripts\activate
+
+* goto build/python folder and run:
+
+.. code-block:: bash
+
+ python setup.py install
+
+* Make _singa_wrap.pyd, libglog.dll and libopenblas.dll available by adding
them to the path or by copying them to singa package folder in the python
site-packages
+
+* Verify that SINGA is installed by running:
+
+.. code-block:: bash
+
+ python -c "from singa import tensor"
+
+A video tutorial for the build process can be found here:
+
+
+.. |video| image:: https://img.youtube.com/vi/cteER7WeiGk/0.jpg
+ :scale: 100%
+ :align: middle
+ :target: https://www.youtube.com/watch?v=cteER7WeiGk
+
++---------+
+| |video| |
++---------+
+
+
+
+
+
+
+
+
+
+
+
Modified: incubator/singa/site/trunk/en/_sources/docs/installation.md.txt
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_sources/docs/installation.md.txt?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_sources/docs/installation.md.txt (original)
+++ incubator/singa/site/trunk/en/_sources/docs/installation.md.txt Wed May 9
15:25:26 2018
@@ -276,39 +276,7 @@ This setting is used to build the Debian
### Compile SINGA on Windows
-For the dependent library installation, please refer to
[Dependencies](dependencies.md).
-After all the dependencies are successfully installed, just run the following
commands to
-generate the VS solution in cmd under singa folder:
-
- $ md build && cd build
- $ cmake -G "Visual Studio 14" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF ..
-
-The default project generated by the command is 32-bit version. You can also
-specify a 64-bit version project by:
-
- $ md build && cd build
- $ cmake -G "Visual Studio 14 Win64" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF ..
-
-If you get error outputs like "Could NOT find xxxxx" indicating a dependent
-library missing, configure your library file and include path for cmake or the
system.
-For example, you get an error "Could NOT find CBLAS" and suppose you installed
-openblas header files at "d:\include" and openblas library at "d:\lib". You
should run the
-following command to specify your cblas parameters in cmake:
-
- $ cmake -G "Visual Studio 14" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF
-DCBLAS_INCLUDE_DIR="d:\include" -DCBLAS_LIBRARIES="d:\lib\libopenblas.lib"
-DProtobuf_INCLUDE_DIR=<include dir of protobuf> -DProtobuf_LIBRARIES=<path to
libprotobuf.lib> -DProtobuf_PROTOC_EXECUTABLE=<path to protoc.exe>
-DGLOG_INCLUDE_DIR=<include dir of glog> -DGLOG_LIBRARIES=<path to libglog.lib>
..
-
-To find out the parameters you need to specify for some special libraries, you
-can run the following command:
-
- $ cmake -LAH
-
-If you use cmake GUI tool in windows, make sure you configure the right
-parameters for the singa solution by select "Advanced" box. After generating
the VS project,
-open the "singa.sln" project file under
-the "build" folder and compile it as a normal VS solution. You will find the
-unit tests file named "test_singa" in the project binary folder.
-If you get errors when running test_singa.exe due to
libglog.dll/libopenblas.dll missing,
-just copy the dll files into the same folder as test_singa.exe
+Instructions for building on Windows with Python support can be found
[here](install_win.html).
## FAQ
Modified: incubator/singa/site/trunk/en/_static/css/badge_only.css
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_static/css/badge_only.css?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_static/css/badge_only.css (original)
+++ incubator/singa/site/trunk/en/_static/css/badge_only.css Wed May 9
15:25:26 2018
@@ -1 +1 @@
-.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix")
format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff")
format("woff"),url("../fonts/fontawesome-webfont.ttf")
format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome")
format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a
.fa{display:inline-block;text-decoration:inherit}li
.fa{display:inline-block}li .fa-large:before,li
.fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas
li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li
.fa-large:before{vertical-align:baseline}.fa-book:before{content:"ï"}.ic
on-book:before{content:"ï"}.fa-caret-down:before{content:"ï"}.icon-caret-down:before{content:"ï"}.fa-caret-up:before{content:"ï"}.icon-caret-up:before{content:"ï"}.fa-caret-left:before{content:"ï"}.icon-caret-left:before{content:"ï"}.fa-caret-right:before{content:"ï"}.icon-caret-right:before{content:"ï"}.rst-versions{position:fixed;bottom:0;left:0;overflow-y:scroll;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica
Neue",Arial,sans-serif;z-index:400}.rst-versions
a{color:#2980B9;text-decoration:none}.rst-versions
.rst-badge-small{display:none}.rst-versions
.rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions
.rst-current-version:before,.rst-versions
.rst-current-version:after{display:table;content:""}.rst-versions
.rst-current-version:after{clear:both}.rst-versions .rst-current-version
.fa{color:#fcf
cfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions
.rst-current-version .icon-book{float:left}.rst-versions
.rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions
.rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{max-height:100%}.rst-versions.shift-up
.rst-other-versions{display:block}.rst-versions
.rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions
.rst-other-versions hr{display:block;height:1px;border:0;margin:20px
0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions
dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd
a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge
.icon-book{float:none}.rst-versions.rst-badge
.fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{te
xt-align:right}.rst-versions.rst-badge.shift-up .rst-current-version
.fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version
.icon-book{float:left}.rst-versions.rst-badge
.rst-current-version{width:auto;height:30px;line-height:30px;padding:0
6px;display:block;text-align:center}@media screen and (max-width:
768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
+.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix")
format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff")
format("woff"),url("../fonts/fontawesome-webfont.ttf")
format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome")
format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a
.fa{display:inline-block;text-decoration:inherit}li
.fa{display:inline-block}li .fa-large:before,li
.fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas
li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li
.fa-large:before{vertical-align:baseline}.fa-book:before{content:"ï"}.ic
on-book:before{content:"ï"}.fa-caret-down:before{content:"ï"}.icon-caret-down:before{content:"ï"}.fa-caret-up:before{content:"ï"}.icon-caret-up:before{content:"ï"}.fa-caret-left:before{content:"ï"}.icon-caret-left:before{content:"ï"}.fa-caret-right:before{content:"ï"}.icon-caret-right:before{content:"ï"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica
Neue",Arial,sans-serif;z-index:400}.rst-versions
a{color:#2980B9;text-decoration:none}.rst-versions
.rst-badge-small{display:none}.rst-versions
.rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions
.rst-current-version:before,.rst-versions
.rst-current-version:after{display:table;content:""}.rst-versions
.rst-current-version:after{clear:both}.rst-versions .rst-current-version
.fa{color:#fcfcfc}.rst-versions
.rst-current-version .fa-book{float:left}.rst-versions .rst-current-version
.icon-book{float:left}.rst-versions
.rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions
.rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up
.rst-other-versions{display:block}.rst-versions
.rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions
.rst-other-versions hr{display:block;height:1px;border:0;margin:20px
0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions
dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd
a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge
.icon-book{float:none}.rst-versions.rst-badge
.fa-book{float:none}.rst-versions.rst-badge.shift-up
.rst-current-version{text-ali
gn:right}.rst-versions.rst-badge.shift-up .rst-current-version
.fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version
.icon-book{float:left}.rst-versions.rst-badge
.rst-current-version{width:auto;height:30px;line-height:30px;padding:0
6px;display:block;text-align:center}@media screen and (max-width:
768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
Modified: incubator/singa/site/trunk/en/_static/css/theme.css
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_static/css/theme.css?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_static/css/theme.css (original)
+++ incubator/singa/site/trunk/en/_static/css/theme.css Wed May 9 15:25:26 2018
@@ -1,4 +1,4 @@
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}[hidden]{display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:hover,a:active{outline:0}abbr[title]{border-bottom:1px
dotted}b,strong{font-weight:bold}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:bold}pre,code,.rst-content
tt,.rst-content
code,kbd,samp{font-family:monospace,serif;_font-family:"courier
new",monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:before,q:after{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;
vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}ul,ol,dl{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:0;margin:0;padding:0}label{cursor:pointer}legend{border:0;*margin-left:-7px;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*width:13px;*height:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-de
coration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em
0;background:#ccc;color:#000;padding:.2em
0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir
br{display:none}.hidden{display:none
!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0
0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media
print{html,body,section{background:none !important}*{box-shadow:
none !important;text-shadow:none !important;filter:none
!important;-ms-filter:none !important}a,a:visited{text-decoration:underline}.ir
a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%
!important}@page{margin:.5cm}p,h2,.rst-content .toctree-wrapper
p.caption,h3{orphans:3;widows:3}h2,.rst-content .toctree-wrapper
p.caption,h3{page-break-after:avoid}}.fa:before,.wy-menu-vertical li
span.toctree-expand:before,.wy-menu-vertical li.on a
span.toctree-expand:before,.wy-menu-vertical li.current>a
span.toctree-expand:before,.rst-content .admonition-title:before,.rst-content
h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3
.headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5
.headerlink:before,.rst-content h6 .headerlink:before,.rst-content dl dt
.headerlink:before,.rst-content p.caption .headerlink:before,.rst-con
tent table>caption .headerlink:before,.rst-content tt.download
span:first-child:before,.rst-content code.download
span:first-child:before,.icon:before,.wy-dropdown
.caret:before,.wy-inline-validate.wy-inline-validate-success
.wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger
.wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning
.wy-input-context:before,.wy-inline-validate.wy-inline-validate-info
.wy-input-context:before,.wy-alert,.rst-content .note,.rst-content
.attention,.rst-content .caution,.rst-content .danger,.rst-content
.error,.rst-content .hint,.rst-content .important,.rst-content
.tip,.rst-content .warning,.rst-content .seealso,.rst-content
.admonition-todo,.rst-content
.admonition,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],inp
ut[type="tel"],input[type="color"],select,textarea,.wy-menu-vertical li.on
a,.wy-menu-vertical li.current>a,.wy-side-nav-search>a,.wy-side-nav-search
.wy-dropdown>a,.wy-nav-top
a{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT
License)
[... 3 lines stripped ...]
Modified: incubator/singa/site/trunk/en/_static/js/theme.js
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/_static/js/theme.js?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/_static/js/theme.js (original)
+++ incubator/singa/site/trunk/en/_static/js/theme.js Wed May 9 15:25:26 2018
@@ -1 +1 @@
-require=function r(s,a,l){function c(i,n){if(!a[i]){if(!s[i]){var
e="function"==typeof require&&require;if(!n&&e)return e(i,!0);if(u)return
u(i,!0);var t=new Error("Cannot find module '"+i+"'");throw
t.code="MODULE_NOT_FOUND",t}var
o=a[i]={exports:{}};s[i][0].call(o.exports,function(n){var e=s[i][1][n];return
c(e||n)},o,o.exports,r,s,a,l)}return a[i].exports}for(var u="function"==typeof
require&&require,n=0;n<l.length;n++)c(l[n]);return
c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof
window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var
i=this;i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,r
equestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var
t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical
.current ul li a",function(){var
n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div
class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div
class='wy-table-responsive
footnote'></div>"),i("table.docutils.citation").wrap("<div
class='wy-table-responsive citation'></div>
"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var
e=i(this);expand=i('<span
class="toctree-expand"></span>'),expand.on("click",function(n){return
t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var
n=encodeURI(window.location.hash)||"#";try{var
e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var
t=$('.document
[id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical
.current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error
expanding nav for anchor",o)}},onScroll:function(){this.winScro
ll=!1;var
n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var
e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find(">
ul
li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof
window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav}),function(){for(var
r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(win
dow.requestAnimationFrame=function(n,e){var i=(new
Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return
r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
\ No newline at end of file
+require=function r(s,a,l){function c(i,n){if(!a[i]){if(!s[i]){var
e="function"==typeof require&&require;if(!n&&e)return e(i,!0);if(u)return
u(i,!0);var t=new Error("Cannot find module '"+i+"'");throw
t.code="MODULE_NOT_FOUND",t}var
o=a[i]={exports:{}};s[i][0].call(o.exports,function(n){var e=s[i][1][n];return
c(e||n)},o,o.exports,r,s,a,l)}return a[i].exports}for(var u="function"==typeof
require&&require,n=0;n<l.length;n++)c(l[n]);return
c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof
window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var
i=this;"undefined"==typeof
withStickNav&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",
function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var
t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical
.current ul li a",function(){var
n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div
class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div
class='wy-table-responsive
footnote'></div>"),i("table.docutils.citation").wrap("<div cl
ass='wy-table-responsive citation'></div>"),i(".wy-menu-vertical
ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span
class="toctree-expand"></span>'),expand.on("click",function(n){return
t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var
n=encodeURI(window.location.hash)||"#";try{var
e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var
t=$('.document
[id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical
.current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error
expanding nav for anch
or",o)}},onScroll:function(){this.winScroll=!1;var
n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var
e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find(">
ul
li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof
window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var
r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[
n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var
i=(new
Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return
r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
\ No newline at end of file
Modified: incubator/singa/site/trunk/en/community/issue-tracking.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/community/issue-tracking.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/community/issue-tracking.html (original)
+++ incubator/singa/site/trunk/en/community/issue-tracking.html Wed May 9
15:25:26 2018
@@ -241,9 +241,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/community/mail-lists.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/community/mail-lists.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/community/mail-lists.html (original)
+++ incubator/singa/site/trunk/en/community/mail-lists.html Wed May 9 15:25:26
2018
@@ -268,9 +268,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/community/source-repository.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/community/source-repository.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/community/source-repository.html (original)
+++ incubator/singa/site/trunk/en/community/source-repository.html Wed May 9
15:25:26 2018
@@ -259,9 +259,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/community/team-list.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/community/team-list.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/community/team-list.html (original)
+++ incubator/singa/site/trunk/en/community/team-list.html Wed May 9 15:25:26
2018
@@ -364,9 +364,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/develop/contribute-code.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/contribute-code.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/contribute-code.html (original)
+++ incubator/singa/site/trunk/en/develop/contribute-code.html Wed May 9
15:25:26 2018
@@ -294,9 +294,7 @@ will be automatically updated. For detai
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/develop/contribute-docs.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/contribute-docs.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/contribute-docs.html (original)
+++ incubator/singa/site/trunk/en/develop/contribute-docs.html Wed May 9
15:25:26 2018
@@ -272,9 +272,7 @@ $ svn commit -m "commit messages&qu
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/develop/how-contribute.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/how-contribute.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/how-contribute.html (original)
+++ incubator/singa/site/trunk/en/develop/how-contribute.html Wed May 9
15:25:26 2018
@@ -243,9 +243,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/develop/schedule.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/develop/schedule.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/develop/schedule.html (original)
+++ incubator/singa/site/trunk/en/develop/schedule.html Wed May 9 15:25:26 2018
@@ -418,9 +418,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs.html (original)
+++ incubator/singa/site/trunk/en/docs.html Wed May 9 15:25:26 2018
@@ -204,24 +204,24 @@
</li>
<li class="toctree-l2"><a class="reference internal"
href="docs/device.html">Device</a><ul>
<li class="toctree-l3"><a class="reference internal"
href="docs/device.html#specific-devices">Specific devices</a></li>
-<li class="toctree-l3"><a class="reference internal"
href="docs/device.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="docs/device.html#module-singa.device">Python API</a></li>
<li class="toctree-l3"><a class="reference internal"
href="docs/device.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal"
href="docs/tensor.html">Tensor</a><ul>
<li class="toctree-l3"><a class="reference internal"
href="docs/tensor.html#tensor-implementation">Tensor implementation</a></li>
-<li class="toctree-l3"><a class="reference internal"
href="docs/tensor.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="docs/tensor.html#module-singa.tensor">Python API</a></li>
<li class="toctree-l3"><a class="reference internal"
href="docs/tensor.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal"
href="docs/layer.html">Layer</a><ul>
-<li class="toctree-l3"><a class="reference internal"
href="docs/layer.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="docs/layer.html#module-singa.layer">Python API</a></li>
<li class="toctree-l3"><a class="reference internal"
href="docs/layer.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal"
href="docs/net.html">FeedForward Net</a></li>
<li class="toctree-l2"><a class="reference internal"
href="docs/initializer.html">Initializer</a><ul>
-<li class="toctree-l3"><a class="reference internal"
href="docs/initializer.html#python-api">Python API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="docs/initializer.html#module-singa.initializer">Python API</a></li>
<li class="toctree-l3"><a class="reference internal"
href="docs/initializer.html#cpp-api">CPP API</a></li>
</ul>
</li>
@@ -325,9 +325,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/cnn.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/cnn.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/cnn.html (original)
+++ incubator/singa/site/trunk/en/docs/cnn.html Wed May 9 15:25:26 2018
@@ -364,9 +364,7 @@ $ python download_data.py py
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/converter.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/converter.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/converter.html (original)
+++ incubator/singa/site/trunk/en/docs/converter.html Wed May 9 15:25:26 2018
@@ -188,8 +188,8 @@
<div role="main" class="document" itemscope="itemscope"
itemtype="http://schema.org/Article">
<div itemprop="articleBody">
- <div class="section" id="caffe-converter">
-<h1>Caffe Converter<a class="headerlink" href="#caffe-converter"
title="Permalink to this headline">¶</a></h1>
+ <div class="section" id="module-singa.converter">
+<span id="caffe-converter"></span><h1>Caffe Converter<a class="headerlink"
href="#module-singa.converter" title="Permalink to this headline">¶</a></h1>
</div>
@@ -255,9 +255,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/data.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/data.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/data.html (original)
+++ incubator/singa/site/trunk/en/docs/data.html Wed May 9 15:25:26 2018
@@ -188,8 +188,70 @@
<div role="main" class="document" itemscope="itemscope"
itemtype="http://schema.org/Article">
<div itemprop="articleBody">
- <div class="section" id="data">
-<h1>Data<a class="headerlink" href="#data" title="Permalink to this
headline">¶</a></h1>
+ <div class="section" id="module-singa.data">
+<span id="data"></span><h1>Data<a class="headerlink" href="#module-singa.data"
title="Permalink to this headline">¶</a></h1>
+<p>This module includes classes for loading and prefetching data batches.</p>
+<p>Example usage:</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="kn">import</span> <span
class="nn">image_tool</span>
+<span class="kn">from</span> <span class="nn">PIL</span> <span
class="k">import</span> <span class="n">Image</span>
+
+<span class="n">tool</span> <span class="o">=</span> <span
class="n">image_tool</span><span class="o">.</span><span
class="n">ImageTool</span><span class="p">()</span>
+
+<span class="k">def</span> <span class="nf">image_transform</span><span
class="p">(</span><span class="n">img_path</span><span class="p">):</span>
+ <span class="k">global</span> <span class="n">tool</span>
+ <span class="k">return</span> <span class="n">tool</span><span
class="o">.</span><span class="n">load</span><span class="p">(</span><span
class="n">img_path</span><span class="p">)</span><span class="o">.</span><span
class="n">resize_by_range</span><span class="p">(</span>
+ <span class="p">(</span><span class="mi">112</span><span
class="p">,</span> <span class="mi">128</span><span class="p">))</span><span
class="o">.</span><span class="n">random_crop</span><span class="p">(</span>
+ <span class="p">(</span><span class="mi">96</span><span
class="p">,</span> <span class="mi">96</span><span class="p">))</span><span
class="o">.</span><span class="n">flip</span><span class="p">()</span><span
class="o">.</span><span class="n">get</span><span class="p">()</span>
+
+<span class="n">data</span> <span class="o">=</span> <span
class="n">ImageBatchIter</span><span class="p">(</span><span
class="s1">'train.txt'</span><span class="p">,</span> <span
class="mi">3</span><span class="p">,</span>
+ <span class="n">image_transform</span><span
class="p">,</span> <span class="n">shuffle</span><span class="o">=</span><span
class="kc">True</span><span class="p">,</span> <span
class="n">delimiter</span><span class="o">=</span><span
class="s1">','</span><span class="p">,</span>
+ <span class="n">image_folder</span><span
class="o">=</span><span class="s1">'images/'</span><span
class="p">,</span>
+ <span class="n">capacity</span><span
class="o">=</span><span class="mi">10</span><span class="p">)</span>
+<span class="n">data</span><span class="o">.</span><span
class="n">start</span><span class="p">()</span>
+<span class="c1"># imgs is a numpy array for a batch of images,</span>
+<span class="c1"># shape: batch_size, 3 (RGB), height, width</span>
+<span class="n">imgs</span><span class="p">,</span> <span
class="n">labels</span> <span class="o">=</span> <span
class="n">data</span><span class="o">.</span><span class="n">next</span><span
class="p">()</span>
+
+<span class="c1"># convert numpy array back into images</span>
+<span class="k">for</span> <span class="n">idx</span> <span
class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span
class="n">imgs</span><span class="o">.</span><span class="n">shape</span><span
class="p">[</span><span class="mi">0</span><span class="p">]):</span>
+ <span class="n">img</span> <span class="o">=</span> <span
class="n">Image</span><span class="o">.</span><span
class="n">fromarray</span><span class="p">(</span><span
class="n">imgs</span><span class="p">[</span><span class="n">idx</span><span
class="p">]</span><span class="o">.</span><span class="n">astype</span><span
class="p">(</span><span class="n">np</span><span class="o">.</span><span
class="n">uint8</span><span class="p">)</span><span class="o">.</span><span
class="n">transpose</span><span class="p">(</span><span
class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span
class="p">,</span> <span class="mi">0</span><span class="p">),</span>
+ <span class="s1">'RGB'</span><span
class="p">)</span>
+ <span class="n">img</span><span class="o">.</span><span
class="n">save</span><span class="p">(</span><span
class="s1">'img</span><span class="si">%d</span><span
class="s1">.png'</span> <span class="o">%</span> <span
class="n">idx</span><span class="p">)</span>
+<span class="n">data</span><span class="o">.</span><span
class="n">end</span><span class="p">()</span>
+</pre></div>
+</div>
+<dl class="class">
+<dt id="singa.data.ImageBatchIter">
+<em class="property">class </em><code
class="descclassname">singa.data.</code><code
class="descname">ImageBatchIter</code><span
class="sig-paren">(</span><em>img_list_file</em>, <em>batch_size</em>,
<em>image_transform</em>, <em>shuffle=True</em>, <em>delimiter=' '</em>,
<em>image_folder=None</em>, <em>capacity=10</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.data.ImageBatchIter" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Utility for iterating over an image dataset to get mini-batches.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>img_list_file</strong> (<em>str</em>) â name of the file
containing image meta data; each
+line consists of image_path_suffix delimiter meta_info,
+where meta info could be label index or label strings, etc.
+meta_info should not contain the delimiter. If the meta_info
+of each image is just the label index, then we will parse the
+label index into a numpy array with length=batchsize
+(for compatibility); otherwise, we return a list of meta_info;
+if meta info is available, we return a list of None.</li>
+<li><strong>batch_size</strong> (<em>int</em>) â num of samples in one
mini-batch</li>
+<li><strong>image_transform</strong> â a function for image augmentation; it
accepts the full
+image path and outputs a list of augmented images.</li>
+<li><strong>shuffle</strong> (<em>boolean</em>) â True for shuffling images
in the list</li>
+<li><strong>delimiter</strong> (<em>char</em>) â delimiter between
image_path_suffix and label, e.g.,
+space or comma</li>
+<li><strong>image_folder</strong> (<em>boolean</em>) â prefix of the image
path</li>
+<li><strong>capacity</strong> (<em>int</em>) â the max num of mini-batches
in the internal queue.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
</div>
@@ -255,9 +317,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/dependencies.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/dependencies.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/dependencies.html (original)
+++ incubator/singa/site/trunk/en/docs/dependencies.html Wed May 9 15:25:26
2018
@@ -298,9 +298,7 @@ folders).</p>
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/device.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/device.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/device.html (original)
+++ incubator/singa/site/trunk/en/docs/device.html Wed May 9 15:25:26 2018
@@ -96,7 +96,7 @@
<li class="toctree-l2"><a class="reference internal"
href="software_stack.html">Software Stack</a></li>
<li class="toctree-l2 current"><a class="current reference internal"
href="#">Device</a><ul>
<li class="toctree-l3"><a class="reference internal"
href="#specific-devices">Specific devices</a></li>
-<li class="toctree-l3"><a class="reference internal" href="#python-api">Python
API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="#module-singa.device">Python API</a></li>
<li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP
API</a></li>
</ul>
</li>
@@ -208,8 +208,49 @@ of memory and execution are implemented
<li>OpenclGPU for a GPU card which runs OpenCL code</li>
</ol>
</div>
-<div class="section" id="python-api">
-<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to
this headline">¶</a></h2>
+<div class="section" id="module-singa.device">
+<span id="python-api"></span><h2>Python API<a class="headerlink"
href="#module-singa.device" title="Permalink to this headline">¶</a></h2>
+<p>This script includes Device class and its subclasses for python users
+to call singa::Device and its methods.</p>
+<p>TODO(wangwei) implement py CudaGPU class.</p>
+<dl class="function">
+<dt id="singa.device.create_cuda_gpus">
+<code class="descclassname">singa.device.</code><code
class="descname">create_cuda_gpus</code><span
class="sig-paren">(</span><em>num</em><span class="sig-paren">)</span><a
class="headerlink" href="#singa.device.create_cuda_gpus" title="Permalink to
this definition">¶</a></dt>
+<dd><p>Create a list of CudaGPU devices.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><strong>num</strong> (<em>int</em>) â number of device to
create.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td
class="field-body">a list of swig converted CudaGPU devices.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.device.create_cuda_gpus_on">
+<code class="descclassname">singa.device.</code><code
class="descname">create_cuda_gpus_on</code><span
class="sig-paren">(</span><em>device_ids</em><span class="sig-paren">)</span><a
class="headerlink" href="#singa.device.create_cuda_gpus_on" title="Permalink to
this definition">¶</a></dt>
+<dd><p>Create a list of CudaGPU devices.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><strong>device_ids</strong> (<em>list</em>) â a list of
GPU card IDs.</td>
+</tr>
+<tr class="field-even field"><th class="field-name">Returns:</th><td
class="field-body">a list of swig converted CudaGPU devices.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.device.get_default_device">
+<code class="descclassname">singa.device.</code><code
class="descname">get_default_device</code><span class="sig-paren">(</span><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.device.get_default_device" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Get the default host device which is a CppCPU device</p>
+</dd></dl>
+
<p>The following code provides examples of creating devices:</p>
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="kn">from</span> <span
class="nn">singa</span> <span class="k">import</span> <span
class="n">device</span>
<span class="n">cuda</span> <span class="o">=</span> <span
class="n">device</span><span class="o">.</span><span
class="n">create_cuda_gpu_on</span><span class="p">(</span><span
class="mi">0</span><span class="p">)</span> <span class="c1"># use GPU card of
ID 0</span>
@@ -287,9 +328,7 @@ of memory and execution are implemented
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/docker.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/docker.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/docker.html (original)
+++ incubator/singa/site/trunk/en/docs/docker.html Wed May 9 15:25:26 2018
@@ -280,9 +280,7 @@ The folder structure is like</p>
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/image_tool.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/image_tool.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/image_tool.html (original)
+++ incubator/singa/site/trunk/en/docs/image_tool.html Wed May 9 15:25:26 2018
@@ -188,8 +188,338 @@
<div role="main" class="document" itemscope="itemscope"
itemtype="http://schema.org/Article">
<div itemprop="articleBody">
- <div class="section" id="image-tool">
-<h1>Image Tool<a class="headerlink" href="#image-tool" title="Permalink to
this headline">¶</a></h1>
+ <div class="section" id="module-singa.image_tool">
+<span id="image-tool"></span><h1>Image Tool<a class="headerlink"
href="#module-singa.image_tool" title="Permalink to this headline">¶</a></h1>
+<p>An utility model for image augmentation.</p>
+<p>Example usage:</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="kn">from</span> <span
class="nn">singa</span> <span class="k">import</span> <span
class="n">image_tool</span>
+
+<span class="n">tool</span> <span class="o">=</span> <span
class="n">image_tool</span><span class="o">.</span><span
class="n">ImageTool</span><span class="p">()</span>
+<span class="n">imgs</span> <span class="o">=</span> <span
class="n">tool</span><span class="o">.</span><span class="n">load</span><span
class="p">(</span><span class="s1">'input.png'</span><span
class="p">)</span><span class="o">.</span> <span
class="n">resize_by_list</span><span class="p">([</span><span
class="mi">112</span><span class="p">])</span><span class="o">.</span><span
class="n">crop5</span><span class="p">((</span><span class="mi">96</span><span
class="p">,</span> <span class="mi">96</span><span class="p">),</span> <span
class="mi">5</span><span class="p">)</span><span class="o">.</span><span
class="n">enhance</span><span class="p">()</span><span class="o">.</span><span
class="n">flip</span><span class="p">()</span><span class="o">.</span><span
class="n">get</span><span class="p">()</span>
+<span class="k">for</span> <span class="n">idx</span><span class="p">,</span>
<span class="n">img</span> <span class="ow">in</span> <span
class="nb">enumerate</span><span class="p">(</span><span
class="n">imgs</span><span class="p">):</span>
+ <span class="n">img</span><span class="o">.</span><span
class="n">save</span><span class="p">(</span><span class="s1">'</span><span
class="si">%d</span><span class="s1">.png'</span> <span class="o">%</span>
<span class="n">idx</span><span class="p">)</span>
+</pre></div>
+</div>
+<dl class="class">
+<dt id="singa.image_tool.ImageTool">
+<em class="property">class </em><code
class="descclassname">singa.image_tool.</code><code
class="descname">ImageTool</code><a class="headerlink"
href="#singa.image_tool.ImageTool" title="Permalink to this
definition">¶</a></dt>
+<dd><p>A tool for image augmentation.</p>
+<p>For operations with inplace=True, the returned value is the ImageTool
+instance self, which is for chaining multiple operations; Otherwise, the
+preprocessed images would be returned.</p>
+<p>For operations that has countable pre-processing cases, argument num_case
+could be set to decide the number of pre-processing cases to apply.
+Typically, it is set to 1 for training phases and to the max for test
+phases.</p>
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.color_cast">
+<code class="descname">color_cast</code><span
class="sig-paren">(</span><em>offset=20</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.color_cast" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Add a random value from [-offset, offset] to each channel</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>offset</strong> â cast offset, >0 and <255</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.crop3">
+<code class="descname">crop3</code><span
class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>,
<em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.crop3" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Crop a max square patch of the input image at given position and
+scale it into given size.</p>
+<p>According to img size, crop position could be either
+(left, center, right) or (top, middle, bottom).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â the width and height the
output image</li>
+<li><strong>num_case</strong> â num of cases, must be in [1,3]</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.crop5">
+<code class="descname">crop5</code><span
class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>,
<em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.crop5" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Crop at positions from [left_top, left_bottom, right_top,
+right_bottom, and center].</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â width and height of the result
image.</li>
+<li><strong>num_case</strong> â num of cases, must be in [1,5]</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.crop8">
+<code class="descname">crop8</code><span
class="sig-paren">(</span><em>patch</em>, <em>num_case=1</em>,
<em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.crop8" title="Permalink to this
definition">¶</a></dt>
+<dd><p>This is a union of patch_5 and patch_and_scale.</p>
+<p>You can follow this example to union any num of cases of imgtool methods</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.enhance">
+<code class="descname">enhance</code><span
class="sig-paren">(</span><em>scale=0.2</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.enhance" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Apply random enhancement for Color,Contrast,Brightness,Sharpness.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>scale</strong> (<em>float</em>) â enhancement degree is from
[1-scale, 1+scale]</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.flip">
+<code class="descname">flip</code><span
class="sig-paren">(</span><em>num_case=1</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.flip" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Randomly flip a img left to right.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>num_case</strong> â num of cases, must be in {1,2}; if 2, then
add the orignal
+and flipped img</li>
+<li><strong>inplace</strong> â inplace imgs or not (return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.flip_down">
+<code class="descname">flip_down</code><span
class="sig-paren">(</span><em>num_case=1</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.flip_down" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Randomly flip a img top to bottom.
+:param num_case: num of cases, must be in {1,2}; if 2, then add the orignal</p>
+<blockquote>
+<div>and flip_down img</div></blockquote>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><strong>inplace</strong> â inplace imgs or not (return
new_imgs)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.num_augmentation">
+<code class="descname">num_augmentation</code><span
class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.num_augmentation" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Return the total number of augmentations to each image</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.random_crop">
+<code class="descname">random_crop</code><span
class="sig-paren">(</span><em>patch</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.random_crop" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Crop the image at random offset to get a patch of the given size.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â width and height of the
patch</li>
+<li><strong>inplace</strong> (<em>Boolean</em>) â replace the internal
images list with the patches
+if True; otherwise, return the patches.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.random_crop_resize">
+<code class="descname">random_crop_resize</code><span
class="sig-paren">(</span><em>patch</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.random_crop_resize" title="Permalink to this
definition">¶</a></dt>
+<dd><dl class="docutils">
+<dt>Crop of the image at a random size between 0.08 to 1 of input image</dt>
+<dd>and random aspect ratio between 3/4 to 4/3.
+This crop is then resized to the given patch size.</dd>
+</dl>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â width and height of the
patch</li>
+<li><strong>inplace</strong> (<em>Boolean</em>) â replace the internal
images list with the patches
+if True; otherwise, return the patches.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.resize_by_list">
+<code class="descname">resize_by_list</code><span
class="sig-paren">(</span><em>size_list</em>, <em>num_case=1</em>,
<em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.resize_by_list" title="Permalink to this
definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>num_case</strong> â num of resize cases, must be <= the
length of size_list</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.resize_by_range">
+<code class="descname">resize_by_range</code><span
class="sig-paren">(</span><em>rng</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.resize_by_range" title="Permalink to this
definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>rng</strong> â a tuple (begin,end), include begin, exclude
end</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.rotate_by_list">
+<code class="descname">rotate_by_list</code><span
class="sig-paren">(</span><em>angle_list</em>, <em>num_case=1</em>,
<em>inplace=True</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.rotate_by_list" title="Permalink to this
definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>num_case</strong> â num of rotate cases, must be <= the
length of angle_list</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="singa.image_tool.ImageTool.rotate_by_range">
+<code class="descname">rotate_by_range</code><span
class="sig-paren">(</span><em>rng</em>, <em>inplace=True</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.ImageTool.rotate_by_range" title="Permalink to this
definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>rng</strong> â a tuple (begin,end) in degree, include begin,
exclude end</li>
+<li><strong>inplace</strong> â inplace imgs or not ( return new_imgs)</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.color_cast">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">color_cast</code><span class="sig-paren">(</span><em>img</em>,
<em>offset</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.color_cast" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Add a random value from [-offset, offset] to each channel</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.crop">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">crop</code><span class="sig-paren">(</span><em>img</em>,
<em>patch</em>, <em>position</em><span class="sig-paren">)</span><a
class="headerlink" href="#singa.image_tool.crop" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Crop the input image into given size at given position.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â width and height of the
patch</li>
+<li><strong>position</strong> (<em>list</em><em>(</em><em>str</em><em>)</em>)
â left_top, left_bottom, right_top, right_bottom</li>
+<li><strong>center.</strong> (<em>and</em>) â </li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.crop_and_resize">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">crop_and_resize</code><span
class="sig-paren">(</span><em>img</em>, <em>patch</em>, <em>position</em><span
class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.crop_and_resize" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Crop a max square patch of the input image at given position and resize
+it into given size.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>patch</strong> (<em>tuple</em>) â width, height</li>
+<li><strong>position</strong> (<em>list</em><em>(</em><em>str</em><em>)</em>)
â left, center, right, top, middle, bottom.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.enhance">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">enhance</code><span class="sig-paren">(</span><em>img</em>,
<em>scale</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.enhance" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Apply random enhancement for Color,Contrast,Brightness,Sharpness.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><strong>scale</strong> (<em>float</em>) â enhancement
degree is from [1-scale, 1+scale]</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.load_img">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">load_img</code><span class="sig-paren">(</span><em>path</em>,
<em>grayscale=False</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.load_img" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Read the image from a give path</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.image_tool.resize">
+<code class="descclassname">singa.image_tool.</code><code
class="descname">resize</code><span class="sig-paren">(</span><em>img</em>,
<em>small_size</em><span class="sig-paren">)</span><a class="headerlink"
href="#singa.image_tool.resize" title="Permalink to this definition">¶</a></dt>
+<dd><p>Resize the image to make the smaller side be at the given size</p>
+</dd></dl>
+
</div>
@@ -255,9 +585,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/index.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/index.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/index.html (original)
+++ incubator/singa/site/trunk/en/docs/index.html Wed May 9 15:25:26 2018
@@ -223,24 +223,24 @@
</li>
<li class="toctree-l1"><a class="reference internal"
href="device.html">Device</a><ul>
<li class="toctree-l2"><a class="reference internal"
href="device.html#specific-devices">Specific devices</a></li>
-<li class="toctree-l2"><a class="reference internal"
href="device.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="device.html#module-singa.device">Python API</a></li>
<li class="toctree-l2"><a class="reference internal"
href="device.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal"
href="tensor.html">Tensor</a><ul>
<li class="toctree-l2"><a class="reference internal"
href="tensor.html#tensor-implementation">Tensor implementation</a></li>
-<li class="toctree-l2"><a class="reference internal"
href="tensor.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="tensor.html#module-singa.tensor">Python API</a></li>
<li class="toctree-l2"><a class="reference internal"
href="tensor.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal"
href="layer.html">Layer</a><ul>
-<li class="toctree-l2"><a class="reference internal"
href="layer.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="layer.html#module-singa.layer">Python API</a></li>
<li class="toctree-l2"><a class="reference internal"
href="layer.html#cpp-api">CPP API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal"
href="net.html">FeedForward Net</a></li>
<li class="toctree-l1"><a class="reference internal"
href="initializer.html">Initializer</a><ul>
-<li class="toctree-l2"><a class="reference internal"
href="initializer.html#python-api">Python API</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="initializer.html#module-singa.initializer">Python API</a></li>
<li class="toctree-l2"><a class="reference internal"
href="initializer.html#cpp-api">CPP API</a></li>
</ul>
</li>
@@ -351,9 +351,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>
Modified: incubator/singa/site/trunk/en/docs/initializer.html
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/initializer.html?rev=1831260&r1=1831259&r2=1831260&view=diff
==============================================================================
--- incubator/singa/site/trunk/en/docs/initializer.html (original)
+++ incubator/singa/site/trunk/en/docs/initializer.html Wed May 9 15:25:26 2018
@@ -99,7 +99,7 @@
<li class="toctree-l2"><a class="reference internal"
href="layer.html">Layer</a></li>
<li class="toctree-l2"><a class="reference internal"
href="net.html">FeedForward Net</a></li>
<li class="toctree-l2 current"><a class="current reference internal"
href="#">Initializer</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="#python-api">Python
API</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="#module-singa.initializer">Python API</a></li>
<li class="toctree-l3"><a class="reference internal" href="#cpp-api">CPP
API</a></li>
</ul>
</li>
@@ -194,8 +194,68 @@
<div class="section" id="initializer">
<h1>Initializer<a class="headerlink" href="#initializer" title="Permalink to
this headline">¶</a></h1>
-<div class="section" id="python-api">
-<h2>Python API<a class="headerlink" href="#python-api" title="Permalink to
this headline">¶</a></h2>
+<div class="section" id="module-singa.initializer">
+<span id="python-api"></span><h2>Python API<a class="headerlink"
href="#module-singa.initializer" title="Permalink to this headline">¶</a></h2>
+<p>Popular initialization methods for parameter values (Tensor objects).</p>
+<p>Example usages:</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="kn">from</span> <span
class="nn">singa</span> <span class="k">import</span> <span
class="n">tensor</span>
+<span class="kn">from</span> <span class="nn">singa</span> <span
class="k">import</span> <span class="n">initializer</span>
+
+<span class="n">x</span> <span class="o">=</span> <span
class="n">tensor</span><span class="o">.</span><span
class="n">Tensor</span><span class="p">((</span><span class="mi">3</span><span
class="p">,</span> <span class="mi">5</span><span class="p">))</span>
+<span class="n">initializer</span><span class="o">.</span><span
class="n">uniform</span><span class="p">(</span><span class="n">x</span><span
class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span
class="mi">5</span><span class="p">)</span> <span class="c1"># use both fan_in
and fan_out</span>
+<span class="n">initializer</span><span class="o">.</span><span
class="n">uniform</span><span class="p">(</span><span class="n">x</span><span
class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span
class="mi">0</span><span class="p">)</span> <span class="c1"># use only
fan_in</span>
+</pre></div>
+</div>
+<dl class="function">
+<dt id="singa.initializer.uniform">
+<code class="descclassname">singa.initializer.</code><code
class="descname">uniform</code><span class="sig-paren">(</span><em>t</em>,
<em>fan_in=0</em>, <em>fan_out=0</em><span class="sig-paren">)</span><a
class="headerlink" href="#singa.initializer.uniform" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Initialize the values of the input tensor following a uniform
+distribution with specific bounds.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>fan_in</strong> (<em>int</em>) â for the weight Tensor of a
convolution layer,
+fan_in = nb_channel * kh * kw; for dense layer,
+fan_in = input_feature_length</li>
+<li><strong>fan_out</strong> (<em>int</em>) â for the convolution layer
weight Tensor,
+fan_out = nb_filter * kh * kw; for the weight Tensor of a dense
+layer, fan_out = output_feature_length</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Ref: [Bengio and Glorot 2010]: Understanding the difficulty of
+training deep feedforward neuralnetworks.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="singa.initializer.gaussian">
+<code class="descclassname">singa.initializer.</code><code
class="descname">gaussian</code><span class="sig-paren">(</span><em>t</em>,
<em>fan_in=0</em>, <em>fan_out=0</em><span class="sig-paren">)</span><a
class="headerlink" href="#singa.initializer.gaussian" title="Permalink to this
definition">¶</a></dt>
+<dd><p>Initialize the values of the input tensor following a Gaussian
+distribution with specific std.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td
class="field-body"><ul class="first last simple">
+<li><strong>fan_in</strong> (<em>int</em>) â for the weight Tensor of a
convolution layer,
+fan_in = nb_channel * kh * kw; for dense layer,
+fan_in = input_feature_length</li>
+<li><strong>fan_out</strong> (<em>int</em>) â for the convolution layer
weight Tensor,
+fan_out = nb_filter * kh * kw; for the weight Tensor of a dense
+layer, fan_out = output_feature_length</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Ref Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: Delving Deep into
+Rectifiers: Surpassing Human-Level Performance on ImageNet Classification</p>
+</dd></dl>
+
</div>
<div class="section" id="cpp-api">
<h2>CPP API<a class="headerlink" href="#cpp-api" title="Permalink to this
headline">¶</a></h2>
@@ -265,9 +325,7 @@
<script type="text/javascript">
jQuery(function () {
-
- SphinxRtdTheme.Navigation.enableSticky();
-
+ SphinxRtdTheme.Navigation.enable(true);
});
</script>