Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions doc/R-package/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

20 changes: 10 additions & 10 deletions doc/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
10 changes: 6 additions & 4 deletions doc/sphinx_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down