diff --git a/R-package/vignettes/classifyRealImageWithPretrainedModel.Rmd b/R-package/vignettes/classifyRealImageWithPretrainedModel.Rmd index 972665416e22..8a0e79c739c4 100644 --- a/R-package/vignettes/classifyRealImageWithPretrainedModel.Rmd +++ b/R-package/vignettes/classifyRealImageWithPretrainedModel.Rmd @@ -9,6 +9,12 @@ real world image. The network architecture is decribed in [1]. The pre-trained Inception-BatchNorm network is able to be downloaded from [this link](http://webdocs.cs.ualberta.ca/~bx3/data/Inception.zip) This model gives the recent state-of-art prediction accuracy on image net dataset. +Preface +------- +This tutorial is written in Rmarkdown. +- You can directly view the hosted version of the tutorial from [MXNet R Document](http://mxnet.readthedocs.org/en/latest/R-package/classifyRealImageWithPretrainedModel.html) +- You can find the download the Rmarkdown source from [here](https://github.com/dmlc/mxnet/blob/master/R-package/vignettes/classifyRealImageWithPretrainedModel.Rmd) + Pacakge Loading --------------- To get started, we load the mxnet package by require mxnet. diff --git a/doc/R-package/index.md b/doc/R-package/index.md index f5b4f8c5f82b..d8e381f8f442 100644 --- a/doc/R-package/index.md +++ b/doc/R-package/index.md @@ -16,7 +16,7 @@ Installation - First build ```../lib/libmxnet.so``` by following [Build Instruction](../doc/build.md) - Type ```R CMD INSTALL R-package``` in the root folder. - Contributor Guide ----------------- -* [R Contributor Guide](../contribute.md#r-package) gives various guidelines on how to contribute code, tutorial, rmarkdown examples to mxnet. +* [Contributor Guide](http://mxnet.readthedocs.org/en/latest/contribute.html#r-package) R package section gives various guidelines on how to contribute code, tutorial, rmarkdown examples to mxnet. + diff --git a/doc/contribute.md b/doc/contribute.md index a4cd747fdb97..18568bc2a7dc 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -137,23 +137,23 @@ make roxygen ``` ### Rmarkdown Vignettes -Rmarkdown vignettes are placed in [root/R-package/vignettes](../R-package/vignettes) -These Rmarkdown files are not compiled. We host the compiled version on [root/doc/R-package](R-package) +Rmarkdown vignettes are placed in [R-package/vignettes](../R-package/vignettes) +These Rmarkdown files are not compiled. We host the compiled version on [doc/R-package](R-package) The following steps are followed to add a new Rmarkdown vignettes: -- Add the original rmarkdown to [R-package/vignettes](../R-package/vignettes) +- Add the original rmarkdown to ```R-package/vignettes``` - Modify ```doc/R-package/Makefile``` to add the markdown files to be build -- Clone the [dmlc/doc-image](https://github.com/dmlc/doc-image) repo to folder ```doc``` +- Clone the [dmlc/web-data](https://github.com/dmlc/web-data) repo to folder ```doc``` - Now type the following command on ```doc/R-package``` ```bash -make the-markdown-tomake.md +make the-markdown-to-make.md ``` -- This will generate the markdown, as well as the figures into ```doc/dmlc-image/mxnet/knitr``` -- Add the generated markdown to the doc, modify the ```doc/R-package/index.md``` to point to the doc. -- Add the generated figure to the ```dmlc/dmlc-image``` repo. +- This will generate the markdown, as well as the figures into ```doc/web-data/mxnet/knitr``` +- Modify the ```doc/R-package/index.md``` to point to the generated markdown. +- Add the generated figure to the ```dmlc/web-data``` repo. - If you already cloned the repo to doc, this means a ```git add``` -- Create PR for both the markdown and ```dmlc-image``` -- You can also build the document locally by typing the followig command at ```doc folder``` +- Create PR for both the markdown and ```dmlc/web-data``` +- You can also build the document locally by typing the followig command at ```doc``` ```bash make html ``` diff --git a/doc/sphinx_util.py b/doc/sphinx_util.py index c31c47b196a2..fb05ae56ca6f 100644 --- a/doc/sphinx_util.py +++ b/doc/sphinx_util.py @@ -26,17 +26,19 @@ def run_build_mxnet(folder): else: subprocess.call('cd ../recommonmark/; git pull', shell=True) -if not os.path.exists('doc-image'): - subprocess.call('rm -rf doc-image;' + - 'git clone https://github.com/dmlc/doc-image', shell = True) +if not os.path.exists('web-data'): + subprocess.call('rm -rf web-data;' + + 'git clone https://github.com/dmlc/web-data', shell = True) else: - subprocess.call('cd doc-image; git pull', shell=True) + subprocess.call('cd web-data; git pull', shell=True) run_build_mxnet("..") sys.path.insert(0, os.path.abspath('../recommonmark/')) +sys.stderr.write('READTHEDOCS=%s\n' % (READTHEDOCS_BUILD)) + from recommonmark import parser, transform MarkdownParser = parser.CommonMarkParser