Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[WEBSITE] v1.8 website patch #19212

Merged
merged 30 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f0cf326
Add missing license header for md files (#18541) (#19189)
szha Sep 20, 2020
f47e29c
Fixed Install page history broken (#18182)
Apr 28, 2020
e361a95
Update website version select drop down (#18188)
May 4, 2020
5af665e
Update website version select drop down (#18188)
May 4, 2020
447398c
Fix gluon link missing (#18243)
May 6, 2020
ea7d8ff
fix when clicking version dropdown it jumps to top of the page (#18238)
May 8, 2020
6da9168
Website global search feature (#18288)
May 19, 2020
7305934
replace google CDN with JQuery's own CDN (#18369)
May 20, 2020
881cb95
Add Developer Guide Docs to MXNet Website (#18474)
Jun 4, 2020
2c78a89
fix contribute page anchor position shifted (#18571)
Jun 17, 2020
8f858ef
Clipboard refactor (#18605)
ys2843 Jul 2, 2020
f51b10c
User Feedback Widget (#18639)
ys2843 Jul 7, 2020
cd5fbf7
Fix python micro-site table of content bugs (#18664)
ys2843 Jul 13, 2020
ffcd1e1
Fix all anchor shifts on website (#18674)
ys2843 Jul 14, 2020
c7b7831
use regex that is supported by all browsers (#18811)
ys2843 Jul 29, 2020
52918ec
1.7 compatible fix
ys2843 Sep 8, 2020
96e2625
add jquery fix
ys2843 Sep 8, 2020
994954c
Consolidate installation instructions on website and add disclaimer f…
leezu Jun 10, 2020
79955f7
fix broken installation widget - remove empty entries (#18661)
ys2843 Jul 7, 2020
3d73bba
update static files
ys2843 Sep 9, 2020
a0b1d67
update header dropdown default version
ys2843 Sep 8, 2020
f25bde1
fix failed pipeline
ys2843 Sep 8, 2020
470943f
cherry pick 1.7 content from master
ys2843 Sep 9, 2020
a30fffa
update version number in image classification tutorial
ys2843 Sep 10, 2020
7310738
minor version fix
ys2843 Sep 10, 2020
1775bfe
fix bullet point format bug
ys2843 Sep 10, 2020
6ff0f49
Fixed python website double scroller and improve UX (#18845)
ys2843 Aug 3, 2020
120424f
add jekyll base url to enable relative path
ys2843 Sep 11, 2020
b7486ec
fix python micro site header link path
ys2843 Sep 11, 2020
47599f1
update python site css
ys2843 Sep 11, 2020
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
1,596 changes: 1,396 additions & 200 deletions NEWS.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions R-package/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--- 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. -->

<img src=https://raw.githubusercontent.com/dmlc/dmlc.github.io/master/img/logo-m/mxnetR.png width=155/> Deep Learning for R
==========================

Expand Down
1 change: 1 addition & 0 deletions ci/docker/Dockerfile.build.ubuntu_cpu_jekyll
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && apt-get install -y \
build-essential \
git \
zlib1g-dev \
wget \
gnupg2 \
curl

Expand Down
37 changes: 37 additions & 0 deletions docs/python_docs/_static/feedback.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.feedback-container {
text-align: center;
}

.feedback-answer-container {
display: inline-block;
}

.feedback-question {
display: inline-block;
padding: 0.5em 1em 0.5em 1em;
}

.feedback-answer {
display: inline-block;
padding: 0.5em 1em 0.5em 1em;
color: #048ccc;
cursor: pointer;
}

.feedback-answer:hover {
color: #ffffff;
background-color: #048ccc;
}

.feedback-thank-you {
display: none;
padding: 0.5em 1em 0.5em 1em;
}

.feedback-hr-top {
margin-top: 50px;
}

.feedback-hr-bottom {
margin-bottom: 30px;
}
33 changes: 33 additions & 0 deletions docs/python_docs/_static/feedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*!
* 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.
*/

$(document).ready(function() {
$(".feedback-answer").on("click", function () {
$(".feedback-question").remove();
$(".feedback-answer-container").remove();
$(".feedback-thank-you").show();
ga("send", {
hitType: "event",
eventCategory: "Did this page help you?",
eventAction: $(this).attr("data-response"),
eventLabel: window.location.pathname || "unknown",
eventValue: $(this).attr("data-response") === "yes" ? 1 : 0
});
});
});
8 changes: 6 additions & 2 deletions docs/python_docs/_static/mxnet.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.mdl-layout__header-row {
height: 84px !important;
height: 80px !important;
}

.mdl-shadow--2dp {
Expand Down Expand Up @@ -203,4 +203,8 @@ p {
float: right;
margin: 4px;
cursor: pointer;
}
}

.scrollUp {
transform: translateY(-80px);
}
2 changes: 1 addition & 1 deletion docs/python_docs/python/api/gluon/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Tutorials

.. card::
:title: Gluon Guide
:link: ../tutorials/packages/gluon/index.html
:link: ../../tutorials/packages/gluon/index.html

The Gluon guide. Start here!

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!--- 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. -->

# Image Classication using pretrained ResNet-50 model on Jetson module

This tutorial shows how to install MXNet v1.x with Jetson support and use it to deploy a pre-trained MXNet model for image classification on a Jetson module.

## What's in this tutorial?

This tutorial shows how to:

1. Install MXNet v1.x along with its dependencies on a Jetson module (This tutorial has been tested on Jetson Xavier AGX and Jetson Nano modules)

2. Deploy a pre-trained MXNet model for image classifcation on the module

## Who's this tutorial for?

This tutorial would benefit developers working on Jetson modules implementing deep learning applications. It assumes that readers have a Jetson module setup with Jetpack installed, are familiar with the Jetson working environment and are somewhat familiar with deep learning using MXNet.

## Prerequisites

To complete this tutorial, you need:

* A [Jetson module](https://developer.nvidia.com/embedded/develop/hardware) setup with [Jetpack 4.4](https://docs.nvidia.com/jetson/jetpack/release-notes/) installed using NVIDIA [SDK Manager](https://developer.nvidia.com/nvidia-sdk-manager)

* An SSH connection to the module OR display and keyboard setup to directly open shell on the module

* [Swapfile](https://help.ubuntu.com/community/SwapFaq) installed, especially on Jetson Nano for additional memory (increase memory if the inference script terminates with a `Killed` message)

## Installing MXNet v1.x with Jetson support

To install MXNet with Jetson support, you can follow the [installation guide](https://mxnet.apache.org/get_started/jetson_setup) on MXNet official website.

Alternatively, you can also directly install MXNet v1.6 wheel with Jetson support, hosted on a public s3 bucket. Here are the steps to install this wheel:

*WARNING: this MXNet wheel is provided for your convenience but it contains packages that are not provided nor endorsed by the Apache Software Foundation.
As such, they might contain software components with more restrictive licenses than the Apache License and you'll need to decide whether they are appropriate for your usage. Like all Apache Releases, the
official Apache MXNet (incubating) releases consist of source code only and are found at https://mxnet.apache.org/get_started/download .*

We start by installing MXNet dependencies
```bash
sudo apt-get update
sudo apt-get install -y git build-essential libopenblas-dev libopencv-dev python3-pip
sudo pip3 install -U pip
```

Then we download and install MXNet v1.6 wheel with Jetson support
```bash
wget https://mxnet-public.s3.us-east-2.amazonaws.com/install/jetson/1.6.0/mxnet_cu102-1.6.0-py2.py3-none-linux_aarch64.whl
sudo pip3 install mxnet_cu102-1.6.0-py2.py3-none-linux_aarch64.whl
```

And we are done. You can test the installation now by importing mxnet from python3
```bash
>>> python3 -c 'import mxnet'
```

## Running a pre-trained ResNet-50 model on Jetson

We are now ready to run a pre-trained model and run inference on a Jetson module. In this tutorial we are using ResNet-50 model trained on Imagenet dataset. We run the following classification script with either cpu/gpu context using python3.

```python
from mxnet import gluon
import mxnet as mx

# set context
ctx = mx.gpu()

# load pre-trained model
net = gluon.model_zoo.vision.resnet50_v1(pretrained=True, ctx=ctx)
net.hybridize(static_alloc=True, static_shape=True)

# load labels
lbl_path = gluon.utils.download('http://data.mxnet.io/models/imagenet/synset.txt')
with open(lbl_path, 'r') as f:
labels = [l.rstrip() for l in f]

# download and format image as (batch, RGB, width, height)
img_path = gluon.utils.download('https://github.com/dmlc/web-data/blob/master/mxnet/doc/tutorials/python/predict_image/cat.jpg?raw=true')
img = mx.image.imread(img_path)
img = mx.image.imresize(img, 224, 224) # resize
img = mx.image.color_normalize(img.astype(dtype='float32')/255,
mean=mx.nd.array([0.485, 0.456, 0.406]),
std=mx.nd.array([0.229, 0.224, 0.225])) # normalize
img = img.transpose((2, 0, 1)) # channel first
img = img.expand_dims(axis=0) # batchify
img = img.as_in_context(ctx)

prob = net(img).softmax() # predict and normalize output
idx = prob.topk(k=5)[0] # get top 5 result
for i in idx:
i = int(i.asscalar())
print('With prob = %.5f, it contains %s' % (prob[0,i].asscalar(), labels[i]))
```

After running the above script, you should get the following output showing the five classes that the image most relates to with probability:
```bash
With prob = 0.41940, it contains n02119789 kit fox, Vulpes macrotis
With prob = 0.28096, it contains n02119022 red fox, Vulpes vulpes
With prob = 0.06857, it contains n02124075 Egyptian cat
With prob = 0.03046, it contains n02120505 grey fox, gray fox, Urocyon cinereoargenteus
With prob = 0.02770, it contains n02441942 weasel
```
10 changes: 10 additions & 0 deletions docs/python_docs/themes/mx-theme/mxtheme/feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<hr class="feedback-hr-top" />
<div class="feedback-container">
<div class="feedback-question">Did this page help you?</div>
<div class="feedback-answer-container">
<div class="feedback-answer yes-link" data-response="yes">Yes</div>
<div class="feedback-answer no-link" data-response="no">No</div>
</div>
<div class="feedback-thank-you">Thanks for your feedback!</div>
</div>
<hr class="feedback-hr-bottom" />
18 changes: 18 additions & 0 deletions docs/python_docs/themes/mx-theme/mxtheme/header_top.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@
<a class="page-link" href="{{theme_relative_url}}ecosystem">Ecosystem</a>
<a class="page-link page-current" href="{{theme_relative_url}}api">Docs & Tutorials</a>
<a class="page-link" href="https://github.com/apache/incubator-mxnet">GitHub</a>
<div class="dropdown">
<span class="dropdown-header">1.7
<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true"><path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path></svg>
</span>
<div class="dropdown-content">
<a class="dropdown-option" href="/">master</a><br>
<a class="dropdown-option-active" href="/versions/1.7/">1.7</a><br>
<a class="dropdown-option" href="/versions/1.6/">1.6</a><br>
<a class="dropdown-option" href="/versions/1.5.0/">1.5.0</a><br>
<a class="dropdown-option" href="/versions/1.4.1/">1.4.1</a><br>
<a class="dropdown-option" href="/versions/1.3.1/">1.3.1</a><br>
<a class="dropdown-option" href="/versions/1.2.1/">1.2.1</a><br>
<a class="dropdown-option" href="/versions/1.1.0/">1.1.0</a><br>
<a class="dropdown-option" href="/versions/1.0.0/">1.0.0</a><br>
<a class="dropdown-option" href="/versions/0.12.1/">0.12.1</a><br>
<a class="dropdown-option" href="/versions/0.11.0/">0.11.0</a>
</div>
</div>
</div>
</nav>
</div>
Expand Down
53 changes: 52 additions & 1 deletion docs/python_docs/themes/mx-theme/mxtheme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,54 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<style>
.dropdown {
position: relative;
display: inline-block;
}

.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
z-index: 1;
text-align: left;
}

.dropdown:hover .dropdown-content {
display: block;
}

.dropdown-option:hover {
color: #FF4500;
}

.dropdown-option-active {
color: #FF4500;
font-weight: lighter;
}

.dropdown-option {
color: #000000;
font-weight: lighter;
}

.dropdown-header {
color: #FFFFFF;
display: inline-flex;
}

.dropdown-caret {
width: 18px;
}

.dropdown-caret-path {
fill: #FFFFFF;
}
</style>
{{ super() }}
{% endblock %}

Expand All @@ -16,10 +64,12 @@
'_static/sphinx_materialdesign_theme.css',
'_static/fontawesome/all.css',
'_static/fonts.css',
'_static/feedback.css',
] %}

{%- block header %}
<script type="text/javascript" src="{{ pathto('_static/sphinx_materialdesign_theme.js', 1) }} "></script>
<script type="text/javascript" src="{{ pathto('_static/sphinx_materialdesign_theme.js', 1) }} "></script>
<script type="text/javascript" src="{{ pathto('_static/feedback.js', 1) }}"></script>
{% endblock %}
{%- block relbar1 %}{% endblock %}
{%- block relbar2 %}{% include "relations.html" %}{% endblock %}
Expand All @@ -37,6 +87,7 @@
{%- block document %}
<div class="page-content" role="main">
{% block body %} {% endblock %}
{% include "feedback.html" %}
</div>
<div class="side-doc-outline">
<div class="side-doc-outline--content">
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/python_docs/themes/mx-theme/mxtheme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pygments_style = friendly

[options]
header_links =
relative_url = /
relative_url = /versions/1.7/
primary_color = blue
accent_color = deep_orange

Expand Down
Loading