Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Deep Learning 101: Using Apache MXNet in Apache Zeppelin Notebooks

DZone's Guide to

Deep Learning 101: Using Apache MXNet in Apache Zeppelin Notebooks

Learn how to run deep learning models in Apache Zeppelin notebooks using Apache MXNet.

· AI Zone ·
Free Resource

Insight for I&O leaders on deploying AIOps platforms to enhance performance monitoring today. Read the Guide.

Apache Zeppelin Notebook:

As you can see, we can format this data as a table using Apache Zeppelin display technology.

Use this print statement:

print("%table top1pct\ttop1\top2\ttop2pct\ttop3pct\ttop3\ttop4pct\ttop4\ttop5pct\ttop5\timagefilename\truntime\tuuid\n" + top1pct + "\t" + top1 + "\t" +  top2pct + "\t" + top2 + "\t" +  top3pct + "\t" + top3  + "\t" + top4pct + "\t" + top4 + "\t" +  top5pct + "\t" + top5  + "\t" + filename  + "\t" + str(round(end - start)) + "\t" + uniqueid + "\n" )      

We use the PySpark interpreter to run this Python script, but there's no Spark in here just yet.

This data also gets loaded into Apache Hive via Apache NiFi, as shown here:

Deep Learning Models

You will need to download the following pre-built Inception models and reference them on your server:

  • synset.txt

  • Inception-BN-0000.params

  • Inception-BN-symbol.json

See here for more details.

curl --header 'Host: data.mxnet.io' --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --header 'Referer: http://data.mxnet.io/models/imagenet/' --header 'Connection: keep-alive' 'http://data.mxnet.io/models/imagenet/inception-bn.tar.gz' -o 'inception-bn.tar.gz' -L

curl http://data.mxnet.io/models/imagenet/synset.txt

Here's a similar model.

The source code can be found here and here.

TrueSight is an AIOps platform, powered by machine learning and analytics, that elevates IT operations to address multi-cloud complexity and the speed of digital transformation.

Topics:
apache mxnet ,deep learning ,python ,apache zeppelin ,opencv ,ai ,tutorial

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}