Added: systemml/site/docs/1.1.0/contributing-to-systemml.html
URL: 
http://svn.apache.org/viewvc/systemml/site/docs/1.1.0/contributing-to-systemml.html?rev=1828046&view=auto
==============================================================================
--- systemml/site/docs/1.1.0/contributing-to-systemml.html (added)
+++ systemml/site/docs/1.1.0/contributing-to-systemml.html Fri Mar 30 04:31:05 
2018
@@ -0,0 +1,384 @@
+<!DOCTYPE html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
+    <head>
+        <title>Contributing to SystemML - SystemML 1.1.0</title>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+        
+        <meta name="description" content="Contributing to SystemML">
+        
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" href="css/bootstrap.min.css">
+        <link rel="stylesheet" href="css/main.css">
+        <link rel="stylesheet" href="css/pygments-default.css">
+        <link rel="shortcut icon" href="img/favicon.png">
+    </head>
+    <body>
+        <!--[if lt IE 7]>
+            <p class="chromeframe">You are using an outdated browser. <a 
href="http://browsehappy.com/";>Upgrade your browser today</a> or <a 
href="http://www.google.com/chromeframe/?redirect=true";>install Google Chrome 
Frame</a> to better experience this site.</p>
+        <![endif]-->
+
+        <header class="navbar navbar-default navbar-fixed-top" id="topbar">
+            <div class="container">
+                <div class="navbar-header">
+                    <div class="navbar-brand brand projectlogo">
+                        <a href="http://systemml.apache.org/";><img 
class="logo" src="img/systemml-logo.png" alt="Apache SystemML" title="Apache 
SystemML"/></a>
+                    </div>
+                    <div class="navbar-brand brand projecttitle">
+                        <a href="http://systemml.apache.org/";>Apache 
SystemML<sup id="trademark">™</sup></a><br/>
+                        <span class="version">1.1.0</span>
+                    </div>
+                    <button type="button" class="navbar-toggle collapsed" 
data-toggle="collapse" data-target=".navbar-collapse">
+                        <span class="sr-only">Toggle navigation</span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </button>
+                </div>
+                <nav class="navbar-collapse collapse">
+                    <ul class="nav navbar-nav navbar-right">
+                        <li><a href="index.html">Overview</a></li>
+                        <li><a 
href="https://github.com/apache/systemml";>GitHub</a></li>
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Documentation<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>Running SystemML:</b></li>
+                                <li><a 
href="https://github.com/apache/systemml";>SystemML GitHub README</a></li>
+                                <li><a 
href="spark-mlcontext-programming-guide.html">Spark MLContext</a></li>
+                                <li><a href="spark-batch-mode.html">Spark 
Batch Mode</a>
+                                <li><a href="hadoop-batch-mode.html">Hadoop 
Batch Mode</a>
+                                <li><a href="standalone-guide.html">Standalone 
Guide</a></li>
+                                <li><a href="jmlc.html">Java Machine Learning 
Connector (JMLC)</a>
+                                <li class="divider"></li>
+                                <li><b>Language Guides:</b></li>
+                                <li><a href="dml-language-reference.html">DML 
Language Reference</a></li>
+                                <li><a 
href="beginners-guide-to-dml-and-pydml.html">Beginner's Guide to DML and 
PyDML</a></li>
+                                <li><a 
href="beginners-guide-python.html">Beginner's Guide for Python Users</a></li>
+                                <li><a href="python-reference.html">Reference 
Guide for Python Users</a></li>
+                                <li class="divider"></li>
+                                <li><b>ML Algorithms:</b></li>
+                                <li><a 
href="algorithms-reference.html">Algorithms Reference</a></li>
+                                <li class="divider"></li>
+                                <li><b>Tools:</b></li>
+                                <li><a href="debugger-guide.html">Debugger 
Guide</a></li>
+                                <li><a 
href="developer-tools-systemml.html">IDE Guide</a></li>
+                                <li class="divider"></li>
+                                <li><b>Other:</b></li>
+                                <li><a 
href="contributing-to-systemml.html">Contributing to SystemML</a></li>
+                                <li><a href="engine-dev-guide.html">Engine 
Developer Guide</a></li>
+                                <li><a 
href="troubleshooting-guide.html">Troubleshooting Guide</a></li>
+                                <li><a href="release-process.html">Release 
Process</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">API Docs<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><a 
href="./api/java/index.html">Java</a></li>
+                                <li><a 
href="./api/python/index.html">Python</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Issues<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>JIRA:</b></li>
+                                <li><a 
href="https://issues.apache.org/jira/browse/SYSTEMML";>SystemML JIRA</a></li>
+                                
+                            </ul>
+                        </li>
+                    </ul>
+                </nav>
+            </div>
+        </header>
+
+        <div class="container" id="content">
+          
+            <h1 class="title">Contributing to SystemML</h1>
+          
+
+          <!--
+
+-->
+
+<p>There are many ways to become involved with SystemML:</p>
+
+<ul id="markdown-toc">
+  <li><a href="#mailing-lists" id="markdown-toc-mailing-lists">Mailing 
Lists</a>    <ul>
+      <li><a href="#development-mailing-list" 
id="markdown-toc-development-mailing-list">Development Mailing List</a></li>
+      <li><a href="#issues-mailing-list" 
id="markdown-toc-issues-mailing-list">Issues Mailing List</a></li>
+      <li><a href="#commits-mailing-list" 
id="markdown-toc-commits-mailing-list">Commits Mailing List</a></li>
+    </ul>
+  </li>
+  <li><a href="#issue-tracker" id="markdown-toc-issue-tracker">Issue 
Tracker</a></li>
+  <li><a href="#systemml-on-github" 
id="markdown-toc-systemml-on-github">SystemML on GitHub</a></li>
+  <li><a href="#documentation" 
id="markdown-toc-documentation">Documentation</a></li>
+  <li><a href="#code-format" id="markdown-toc-code-format">Code Format</a>    
<ul>
+      <li><a href="#java-code-format" id="markdown-toc-java-code-format">Java 
Code Format</a></li>
+      <li><a href="#dml-code-format" id="markdown-toc-dml-code-format">DML 
Code Format</a></li>
+    </ul>
+  </li>
+</ul>
+
+<h2 id="mailing-lists">Mailing Lists</h2>
+
+<h3 id="development-mailing-list">Development Mailing List</h3>
+
+<p>Perhaps the easiest way to obtain help and contribute to SystemML is to 
join the SystemML Development
+mailing list ([email protected]). You can subscribe to this list by 
sending an email to
+<a 
href="mailto:[email protected]";>[email protected]</a>.
+You can unsubscribe from this list by sending an email to <a 
href="mailto:[email protected]";>[email protected]</a>.
 The dev mailing list archive can be found
+<a href="http://mail-archives.apache.org/mod_mbox/systemml-dev/";>here</a>.</p>
+
+<h3 id="issues-mailing-list">Issues Mailing List</h3>
+
+<p>The issues mailing list archive can be found
+<a href="http://mail-archives.apache.org/mod_mbox/systemml-issues/";>here</a>.
+To subscribe to the issues list, send an email to
+<a 
href="mailto:[email protected]";>[email protected]</a>.
+To unsubscribe from the issues list, send an email to
+<a 
href="mailto:[email protected]";>[email protected]</a>.</p>
+
+<h3 id="commits-mailing-list">Commits Mailing List</h3>
+
+<p>The commits mailing list archive can be found
+<a href="http://mail-archives.apache.org/mod_mbox/systemml-commits/";>here</a>.
+To subscribe to the issues list, send an email to
+<a 
href="mailto:[email protected]";>[email protected]</a>.
+To unsubscribe from the issues list, send an email to
+<a 
href="mailto:[email protected]";>[email protected]</a>.</p>
+
+<h2 id="issue-tracker">Issue Tracker</h2>
+
+<p>Have you found a bug in SystemML? Have you thought of a way to improve 
SystemML? Are
+you interested in working on SystemML itself? If so, the SystemML
+<a href="https://issues.apache.org/jira/browse/SYSTEMML";>JIRA Issue 
Tracker</a> is the place to go.</p>
+
+<h2 id="systemml-on-github">SystemML on GitHub</h2>
+
+<p>Have you found an issue on the SystemML <a 
href="https://issues.apache.org/jira/browse/SYSTEMML";>JIRA Issue Tracker</a>
+that you are interested in working on?
+If so, add a comment to the issue asking to be assigned the issue. If you 
don&#8217;t hear back in a timely
+fashion, please contact us on the dev mailing list and we will be happy to 
help you.</p>
+
+<p>Once you have an issue to work on, how do you go about doing your work? The 
first thing you need is a GitHub
+account. Once you have a GitHub account, go to the Apache SystemML GitHub site 
at
+<a 
href="https://github.com/apache/systemml";>https://github.com/apache/systemml</a>
 and
+click the Fork button to fork a personal remote copy of the SystemML 
repository to your GitHub account.</p>
+
+<p>The next step is to clone your SystemML fork to your local machine.</p>
+
+<pre><code>$ git clone https://github.com/YOUR_GITHUB_NAME/systemml.git
+</code></pre>
+
+<p>Following this, it&#8217;s a good idea to set your git user name and email 
address. In addition, you may want
+to set the <code>push.default</code> property to <code>simple</code>. You only 
need to execute these commands once.</p>
+
+<pre><code>$ git config --global user.name "Your Name"
+$ git config --global user.email "[email protected]"
+$ git config --global push.default simple
+</code></pre>
+
+<p>Next, reference the main SystemML repository as a remote repository. By 
convention, you can
+call this <code>upstream</code>. You only need to add the remote 
<code>upstream</code> repository once.</p>
+
+<pre><code>$ git remote add upstream https://github.com/apache/systemml.git
+</code></pre>
+
+<p>After this, you should have an <code>origin</code> repository, which 
references your personal forked SystemML
+repository on GitHub, and the <code>upstream</code> repository, which 
references the main SystemML repository
+on GitHub.</p>
+
+<pre><code>$ git remote -v
+origin   https://github.com/YOUR_GITHUB_NAME/systemml.git (fetch)
+origin   https://github.com/YOUR_GITHUB_NAME/systemml.git (push)
+upstream https://github.com/apache/systemml.git (fetch)
+upstream https://github.com/apache/systemml.git (push)
+</code></pre>
+
+<p>The main code branch by convention is the <code>master</code> branch. You 
can check out the <code>master</code> branch
+using the <code>checkout</code> command:</p>
+
+<pre><code>git checkout master
+</code></pre>
+
+<p>To update this branch with the latest official code, you can 
<code>pull</code> from the <code>upstream</code> <code>master</code>
+branch. A <code>pull</code> essentially does a <code>fetch</code> (retrieves 
code) and a <code>merge</code> (merges latest remote
+changes into your local branch):</p>
+
+<pre><code>git pull upstream master
+</code></pre>
+
+<p>It&#8217;s recommended that you create a new, separate branch for your work 
based on the current <code>master</code>
+branch. Give this branch a descriptive name. For example, if you were assigned 
the issue <code>SYSTEMML-101</code>,
+you could use the <code>checkout -b</code> command to create a new branch 
based on the <code>master</code> branch and
+check out this branch:</p>
+
+<pre><code>git checkout -b SYSTEMML-101-my_cool_new_feature
+</code></pre>
+
+<p>At this point, you are ready to do your work on this branch.</p>
+
+<p>If you updates involve code, you should run the complete test suite to 
verify that your
+updates have not had unexpected side-effects in the project. You can do this 
via
+the Maven <code>verify</code> command:</p>
+
+<pre><code>mvn clean verify
+</code></pre>
+
+<p>Your commit messages should follow standard git formatting conventions. If 
your
+commit is in regards to a particular JIRA issue, please
+include a reference to the JIRA issue, such as in the following:</p>
+
+<pre><code>git commit -m "[SYSTEMML-101] My cool new feature"
+</code></pre>
+
+<p>When ready, push your changes on this branch to your remote GitHub fork:</p>
+
+<pre><code>$ git push
+fatal: The current branch SYSTEMML-101-my_cool_new_feature has no upstream 
branch.
+To push the current branch and set the remote as upstream, use
+
+    git push --set-upstream origin SYSTEMML-101-my_cool_new_feature
+
+$ git push --set-upstream origin SYSTEMML-101-my_cool_new_feature
+</code></pre>
+
+<p>At this stage, you can go to your GitHub web page and file a Pull Request 
for the work
+that you did on this branch. A Pull Request is a request for project 
committers (who have
+write access to Apache SystemML) to review your code and integrate your code 
into the project.
+Typically, you will see a green button to allow you to file a Pull Request.</p>
+
+<p>Once your Pull Request is opened at <a 
href="https://github.com/apache/systemml/pulls";>SystemML Pull Requests</a>,
+typically Jenkins will automatically build the project to see
+if all tests pass when run for your particular branch. These automatic builds
+can be seen <a 
href="https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/";>here</a>.</p>
+
+<p>A conversation typically will proceed with regards to your Pull Request. 
Project committers and
+potentially others will give you useful feedback and potentially request that 
some changes be made
+to your code. In response, you can make the requested updates or explain why 
you feel that they make
+sense as they are. If you make additional updates, you can commit the changes 
and then push
+the changes to your remote branch. These updates will automatically appear in 
the pull request.</p>
+
+<p>When your changes are accepted (a committer will write &#8220;Looks good to 
me&#8221;, &#8220;LGTM&#8221;, or something
+similar), a committer will attempt to incorporate your changes into the
+SystemML project. Typically this is done by squashing all of your commits into 
a single commit
+and then rebasing your changes into the master branch. Rebasing gives a linear 
commit history
+to the project.</p>
+
+<p>If the merge in complicated, it is possible that a committer may ask you to 
resolve any merge
+conflicts in your pull request. If any difficulties are experienced, a project 
committer will be
+more than happy to assist in the integration of your work into the project.</p>
+
+<p>After the Pull Request is closed, a comment can be added to the original 
JIRA issue referencing
+the Pull Request, and the issue can be resolved and closed.</p>
+
+<h2 id="documentation">Documentation</h2>
+
+<p>Documentation is one useful way to become involved with SystemML. SystemML 
online documentation
+is generated from markdown using Jekyll. For more information, please see 
GitHub&#8217;s
+<a 
href="https://help.github.com/articles/using-jekyll-as-a-static-site-generator-with-github-pages/";>Using
 Jekyll as a static site generator with GitHub Pages</a>.</p>
+
+<p>After installing Jekyll locally (see <a 
href="https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/";>Setting
 up your GitHub Pages site locally with Jekyll</a>),
+Jekyll can be run from the <code>docs</code> folder via:</p>
+
+<pre><code>bundle exec jekyll serve
+</code></pre>
+
+<p>This allows you to work on the documentation locally at 
http://127.0.0.1:4000.</p>
+
+<p>You can allow others to preview your documentation updates on GitHub by 
pushing the
+<code>docs</code> subtree of your branch to your remote <code>gh-pages</code> 
branch.</p>
+
+<pre><code>git subtree push --prefix docs origin gh-pages
+</code></pre>
+
+<p>For instance, if you have filed a Pull Request for a documentation update 
on a regular branch,
+you could additionally push the <code>docs</code> subtree to the remote 
<code>gh-pages</code> branch. In the Pull Request
+conversation, you could include a link to the documentation that was 
automatically generated
+when you pushed to <code>gh-pages</code>. The URL is 
http://&lt;YOUR_NAME&gt;.github.io/systemml/.</p>
+
+<p>If you experience issues pushing the <code>docs</code> subtree to the 
<code>gh-pages</code> branch because you&#8217;ve
+previously pushed from a different branch, one simple solution is to delete 
the remote <code>gh-pages</code>
+branch and perform the <code>subtree</code> command again.</p>
+
+<pre><code>git push origin --delete gh-pages
+</code></pre>
+
+<h2 id="code-format">Code Format</h2>
+
+<h3 id="java-code-format">Java Code Format</h3>
+
+<p>Java in SystemML should be formatted using a standard format. The 
&#8220;SystemML Format&#8221; at
+<a 
href="https://github.com/apache/systemml/blob/master/dev/code-style/systemml-style-eclipse.xml";><code>dev/code-style/systemml-style-eclipse.xml</code></a>
+can be imported into Eclipse and
+<a 
href="https://github.com/apache/systemml/blob/master/dev/code-style/systemml-style-intellij.xml";><code>dev/code-style/systemml-style-intellij.xml</code></a>
+can be imported into IntelliJ for this purpose.</p>
+
+<p>No trailing whitespace is preferred. IDEs such as Eclipse and IntelliJ can 
be configured
+for this option.</p>
+
+<h3 id="dml-code-format">DML Code Format</h3>
+
+<p>DML in SystemML should be formatted according to a standard format. 
Indentation in DML
+files should be two spaces.</p>
+
+
+        </div> <!-- /container -->
+
+        
+
+        <script src="js/vendor/jquery-1.12.0.min.js"></script>
+        <script src="js/vendor/bootstrap.min.js"></script>
+        <script src="js/vendor/anchor.min.js"></script>
+        <script src="js/main.js"></script>
+        
+
+
+
+
+        <!-- Analytics -->
+        <script>
+            
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+            
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+            
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+            ga('create', 'UA-71553733-1', 'auto');
+            ga('send', 'pageview');
+        </script>
+
+
+
+        <!-- MathJax Section -->
+        <script type="text/x-mathjax-config">
+            MathJax.Hub.Config({
+                TeX: { equationNumbers: { autoNumber: "AMS" } }
+            });
+        </script>
+        <script>
+            // Note that we load MathJax this way to work with local file 
(file://), HTTP and HTTPS.
+            // We could use "//cdn.mathjax...", but that won't support 
"file://".
+            (function(d, script) {
+                script = d.createElement('script');
+                script.type = 'text/javascript';
+                script.async = true;
+                script.onload = function(){
+                    MathJax.Hub.Config({
+                        tex2jax: {
+                            inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ],
+                            displayMath: [ ["$$","$$"], ["\\[", "\\]"] ],
+                            processEscapes: true,
+                            skipTags: ['script', 'noscript', 'style', 
'textarea', 'pre']
+                        }
+                    });
+                };
+                script.src = ('https:' == document.location.protocol ? 
'https://' : 'http://') +
+                    
'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
+                d.getElementsByTagName('head')[0].appendChild(script);
+            }(document));
+        </script>
+    </body>
+</html>

Added: systemml/site/docs/1.1.0/debugger-guide.html
URL: 
http://svn.apache.org/viewvc/systemml/site/docs/1.1.0/debugger-guide.html?rev=1828046&view=auto
==============================================================================
--- systemml/site/docs/1.1.0/debugger-guide.html (added)
+++ systemml/site/docs/1.1.0/debugger-guide.html Fri Mar 30 04:31:05 2018
@@ -0,0 +1,627 @@
+<!DOCTYPE html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
+    <head>
+        <title>SystemML Debugger Guide - SystemML 1.1.0</title>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+        
+        <meta name="description" content="SystemML Debugger Guide">
+        
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" href="css/bootstrap.min.css">
+        <link rel="stylesheet" href="css/main.css">
+        <link rel="stylesheet" href="css/pygments-default.css">
+        <link rel="shortcut icon" href="img/favicon.png">
+    </head>
+    <body>
+        <!--[if lt IE 7]>
+            <p class="chromeframe">You are using an outdated browser. <a 
href="http://browsehappy.com/";>Upgrade your browser today</a> or <a 
href="http://www.google.com/chromeframe/?redirect=true";>install Google Chrome 
Frame</a> to better experience this site.</p>
+        <![endif]-->
+
+        <header class="navbar navbar-default navbar-fixed-top" id="topbar">
+            <div class="container">
+                <div class="navbar-header">
+                    <div class="navbar-brand brand projectlogo">
+                        <a href="http://systemml.apache.org/";><img 
class="logo" src="img/systemml-logo.png" alt="Apache SystemML" title="Apache 
SystemML"/></a>
+                    </div>
+                    <div class="navbar-brand brand projecttitle">
+                        <a href="http://systemml.apache.org/";>Apache 
SystemML<sup id="trademark">™</sup></a><br/>
+                        <span class="version">1.1.0</span>
+                    </div>
+                    <button type="button" class="navbar-toggle collapsed" 
data-toggle="collapse" data-target=".navbar-collapse">
+                        <span class="sr-only">Toggle navigation</span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </button>
+                </div>
+                <nav class="navbar-collapse collapse">
+                    <ul class="nav navbar-nav navbar-right">
+                        <li><a href="index.html">Overview</a></li>
+                        <li><a 
href="https://github.com/apache/systemml";>GitHub</a></li>
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Documentation<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>Running SystemML:</b></li>
+                                <li><a 
href="https://github.com/apache/systemml";>SystemML GitHub README</a></li>
+                                <li><a 
href="spark-mlcontext-programming-guide.html">Spark MLContext</a></li>
+                                <li><a href="spark-batch-mode.html">Spark 
Batch Mode</a>
+                                <li><a href="hadoop-batch-mode.html">Hadoop 
Batch Mode</a>
+                                <li><a href="standalone-guide.html">Standalone 
Guide</a></li>
+                                <li><a href="jmlc.html">Java Machine Learning 
Connector (JMLC)</a>
+                                <li class="divider"></li>
+                                <li><b>Language Guides:</b></li>
+                                <li><a href="dml-language-reference.html">DML 
Language Reference</a></li>
+                                <li><a 
href="beginners-guide-to-dml-and-pydml.html">Beginner's Guide to DML and 
PyDML</a></li>
+                                <li><a 
href="beginners-guide-python.html">Beginner's Guide for Python Users</a></li>
+                                <li><a href="python-reference.html">Reference 
Guide for Python Users</a></li>
+                                <li class="divider"></li>
+                                <li><b>ML Algorithms:</b></li>
+                                <li><a 
href="algorithms-reference.html">Algorithms Reference</a></li>
+                                <li class="divider"></li>
+                                <li><b>Tools:</b></li>
+                                <li><a href="debugger-guide.html">Debugger 
Guide</a></li>
+                                <li><a 
href="developer-tools-systemml.html">IDE Guide</a></li>
+                                <li class="divider"></li>
+                                <li><b>Other:</b></li>
+                                <li><a 
href="contributing-to-systemml.html">Contributing to SystemML</a></li>
+                                <li><a href="engine-dev-guide.html">Engine 
Developer Guide</a></li>
+                                <li><a 
href="troubleshooting-guide.html">Troubleshooting Guide</a></li>
+                                <li><a href="release-process.html">Release 
Process</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">API Docs<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><a 
href="./api/java/index.html">Java</a></li>
+                                <li><a 
href="./api/python/index.html">Python</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Issues<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>JIRA:</b></li>
+                                <li><a 
href="https://issues.apache.org/jira/browse/SYSTEMML";>SystemML JIRA</a></li>
+                                
+                            </ul>
+                        </li>
+                    </ul>
+                </nav>
+            </div>
+        </header>
+
+        <div class="container" id="content">
+          
+            <h1 class="title">SystemML Debugger Guide</h1>
+          
+
+          <!--
+
+-->
+
+<h2 id="overview">Overview</h2>
+
+<p>SystemML supports DML script-level debugging through a command line 
interface.  The SystemML debugger provides functionality typically found in a 
debugging environment like setting breakpoints, controlling program execution, 
and inspecting variables.  To run a script in debug mode, specify the 
&#8216;-debug&#8217; option as shown in below example.</p>
+
+<pre><code>hadoop jar SystemML.jar -f test.dml -debug
+</code></pre>
+
+<h2 id="debugger-commands">Debugger Commands</h2>
+
+<p>After starting a SystemML debug session, a list of available commands is 
automatically displayed.  Debugger commands can be entered at the SystemML 
debugger prompt (SystemMLdb).
+The following sections describe each command along with example usage.</p>
+
+<ul>
+  <li><a href="#help">Help</a></li>
+  <li><a href="#quit">Quit</a></li>
+  <li><a href="#list">List</a></li>
+  <li><a href="#step">Step</a></li>
+  <li><a href="#break">Break</a></li>
+  <li><a href="#delete">Delete</a></li>
+  <li><a href="#info-break">Info break</a></li>
+  <li><a href="#continue">Continue</a></li>
+  <li><a href="#run">Run</a></li>
+  <li><a href="#whatis">Whatis</a></li>
+  <li><a href="#print">Print</a></li>
+  <li><a href="#set">Set</a></li>
+  <li><a href="#info-frame">Info frame</a></li>
+  <li><a href="#list-instruction">List instruction</a></li>
+  <li><a href="#step-instruction">Step instruction</a></li>
+</ul>
+
+<h3 id="help">Help</h3>
+
+<p>Type h for help to display a summary of available debugger commands.</p>
+
+<pre><code>(SystemMLdb) h
+
+SystemMLdb commands:
+h,help                                                 list debugger functions
+r,run                                                  start your DML script
+q,quit                                                 exit debug mode
+c,continue                                             continue running your 
DML script
+l,list &lt;[next numlines] | [prev numlines] | [all]&gt;     display DML 
script source lines. Default: numlines = 10
+b,break &lt;line-number&gt;                                  set breakpoint at 
given line number
+d,delete &lt;line-number&gt;                                 delete breakpoint 
at given line number
+s,step                                                 next line, stepping 
into function calls
+i,info &lt;break | frame&gt;                                 show all 
breakpoints or frames (info &lt;break | frame&gt;)
+p,print &lt;varName&gt;                                      display contents 
of a scalar or matrix variable or
+                                                       rows/columns/cell of 
matrix. (Eg: 'p alpha' or 'p A' or 'p A[1,]')
+set &lt;varName value&gt;                                    set value of a 
scalar or specified cell of a matrix variable. (Eg:
+                                                       'set alpha 0.1' or 'set 
A[1,2] 20')
+whatis &lt;varName&gt;                                       display the type 
(and metadata) of a variable. (Eg: 'whatis alpha'
+                                                       or 'whatis A')
+li,listi &lt;[next numlines] | [prev numlines] | [all]&gt;   display 
corresponding instructions for DML script source lines.
+                                                       Default: numlines = 10  
(for advanced users)
+si,stepi                                               next runtime 
instruction rather than DML source lines (for advanced
+                                                       users)
+
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="quit">Quit</h3>
+
+<p>To exit a debug session, simply type q.</p>
+
+<pre><code>q,quit                                                 exit debug 
mode
+</code></pre>
+
+<p>This returns control to the terminal or console shell which was used to 
launch the session.</p>
+
+<pre><code>(SystemMLdb) q
+$
+</code></pre>
+
+<h2 id="debugger-commands-for-controlling-script-execution">Debugger commands 
for controlling script execution</h2>
+
+<p>This section describes commands that can be used to view and control script 
execution.  The following example script test.dml is used to demonstrate simple 
command usage scenarios.</p>
+
+<pre><code>A = rand (rows=10, cols=5);
+B = rand (rows=5, cols=4);
+D = sum(A);
+print("Sum(A)=" + D);
+C = A %*% B;
+write(C, "output.csv", format="csv");
+</code></pre>
+
+<h3 id="list">List</h3>
+
+<p>After initially launching a debug session, the script is loaded and ready 
to be run.  The l command can be used to display the source lines of the loaded 
script.</p>
+
+<pre><code>l,list &lt;[next numlines] | [prev numlines] | [all]&gt;     
display DML script source lines. Default: numlines = 10
+</code></pre>
+
+<p>Without specifying any options, the list shows up to the next 10 lines of 
the script.  For example:</p>
+
+<pre><code>(SystemMLdb) l
+line    1: A = rand (rows=10, cols=5);
+line    2: B = rand (rows=5, cols=4);
+line    3: D = sum(A);
+line    4: print("Sum(A)=" + D);
+line    5: C = A %*% B;
+line    6: write(C, "output.csv", format="csv");
+</code></pre>
+
+<h3 id="step">Step</h3>
+
+<p>Each line of the script can be stepped through using the s command.</p>
+
+<pre><code>s,step                                                 next line, 
stepping into function calls
+</code></pre>
+
+<p>So continuing with the example from previous section, typing s executes the 
current line 1:</p>
+
+<pre><code>(SystemMLdb) s
+Step reached at .defaultNS::main: (line 2).
+2    B = rand (rows=5, cols=4);
+(SystemMLdb) 
+</code></pre>
+
+<p>As can be seen from the output, the debugger executed line 1 and advanced 
to the next line in script.  The current line is automatically displayed.</p>
+
+<h3 id="break">Break</h3>
+
+<p>To execute a group of instructions up to a specific line, breakpoints can 
be used. To set a breakpoint, use the b command.</p>
+
+<pre><code>b,break &lt;line-number&gt;                                  set 
breakpoint at given line number
+</code></pre>
+
+<p>Continuing the example from step command, the current line was 2.  The 
below command sets a breakpoint at script source line number 4.</p>
+
+<pre><code>(SystemMLdb) b 4    
+Breakpoint added at .defaultNS::main, line 4.
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="delete">Delete</h3>
+
+<p>Use the d command to remove a breakpoint.</p>
+
+<pre><code>d,delete &lt;line-number&gt;                                 delete 
breakpoint at given line number
+</code></pre>
+
+<p>Below is sample output when removing a breakpoint.</p>
+
+<pre><code>(SystemMLdb) d 4
+Breakpoint updated at .defaultNS::main, line 4.
+(SystemMLdb) 
+</code></pre>
+
+<p>If no breakpoint was set at the specified line number, then an appropriate 
message is displayed.</p>
+
+<pre><code>(SystemMLdb) d 4
+Sorry, a breakpoint cannot be deleted at line 4. Please try a different line 
number.
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="info-break">Info break</h3>
+
+<p>To see a list of breakpoints, use the i command with the break option.</p>
+
+<pre><code>i,info break                                           show all 
breakpoints
+</code></pre>
+
+<p>Below is sample output after setting breakpoints at lines 2 and 4 of 
test.dml script.</p>
+
+<pre><code>(SystemMLdb) i break
+Breakpoint  1, at line    2 (enabled)
+Breakpoint  2, at line    4 (enabled)
+(SystemMLdb) 
+</code></pre>
+
+<p>The info command also has a frame option which is discussed in the section 
related to inspecting script variables.</p>
+
+<pre><code>i,info &lt;break | frame&gt;                                 show 
all breakpoints or frames (info &lt;break | frame&gt;)
+</code></pre>
+
+<h3 id="continue">Continue</h3>
+
+<p>The continue command resumes script execution from the current line up to 
the next breakpoint.  If no breakpoints are set, then the rest of the script 
will be executed and the debugger session terminated.</p>
+
+<pre><code>c,continue                                             continue 
running your DML script
+</code></pre>
+
+<p>Since the previous section set a breakpoint at line number 4, typing c to 
continue executes from the current line (2) up to but not including line 4 
(i.e., the line with the breakpoint).</p>
+
+<pre><code>(SystemMLdb) c
+Resuming DML script execution ...
+Breakpoint reached at .defaultNS::main instID 1: (line 4).
+4    print("Sum(A)=" + D);
+(SystemMLdb) 
+</code></pre>
+
+<p>Note that continue is not a valid command if the SystemML runtime has not 
been started.</p>
+
+<pre><code>(SystemMLdb) c
+Runtime has not been started. Try "r" to start DML runtime execution.
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="run">Run</h3>
+
+<p>There are two ways of starting the SystemML runtime for a debug session - 
the step command or the run command.  A common scenario is to set breakpoint(s) 
in the beginning of a debug session, then use r to start the runtime and run 
until the breakpoint is reached or script completion.</p>
+
+<pre><code>r,run                                                  start your 
DML script
+</code></pre>
+
+<p>Using the same script from the previous example, the r command can be used 
in the beginning of the session to run the script up to a breakpoint or program 
completion if no breakpoint were set or reached.</p>
+
+<pre><code>(SystemMLdb) l
+line    1: A = rand (rows=10, cols=5);
+line    2: B = rand (rows=5, cols=4);
+line    3: D = sum(A);
+line    4: print("Sum(A)=" + D);
+line    5: C = A %*% B;
+line    6: write(C, "output.csv", format="csv");
+(SystemMLdb) b 4
+Breakpoint added at .defaultNS::main, line 4.
+(SystemMLdb) r
+Breakpoint reached at .defaultNS::main instID 1: (line 4).
+4    print("Sum(A)=" + D);
+(SystemMLdb) 
+</code></pre>
+
+<p>Note the run command is not valid if the runtime has already been started.  
In that case, use continue or step to execute line(s) of the script.</p>
+
+<pre><code>(SystemMLdb) r
+Runtime has already started. Try "s" to go to next line, or "c" to continue 
running your DML script.
+(SystemMLdb) 
+</code></pre>
+
+<h2 
id="debugger-commands-for-inspecting-or-modifying-script-variables">Debugger 
Commands for inspecting or modifying script variables</h2>
+
+<p>Variables that are in scope can be displayed in multiple ways.  The same 
test.dml script is used for showing sample command usage.</p>
+
+<pre><code>A = rand (rows=10, cols=5);
+B = rand (rows=5, cols=4);
+D = sum(A);
+print("Sum(A)=" + D);
+C = A %*% B;
+write(C, "output.csv", format="csv");
+</code></pre>
+
+<h3 id="whatis">Whatis</h3>
+
+<p>To display the type of a variable, use the whatis command.</p>
+
+<pre><code>whatis &lt;varName&gt;                                       
display the type (and metadata) of a variable. (Eg: 'whatis alpha'
+                                                       or 'whatis A')
+</code></pre>
+
+<p>Given sample test.dml script with current line 4, then the metadata of 
variables A, B, D can be shown.</p>
+
+<pre><code>(SystemMLdb) whatis A
+Metadata of A: matrix[rows = 10, cols = 5, rpb = 1000, cpb = 1000]
+(SystemMLdb) whatis B
+Metadata of B: matrix[rows = 5, cols = 4, rpb = 1000, cpb = 1000]
+(SystemMLdb) whatis D
+Metadata of D: DataType.SCALAR
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="print">Print</h3>
+
+<p>To view the contents of a variable, use the p command.</p>
+
+<pre><code>p,print &lt;varName&gt;                                      
display contents of a scalar or matrix variable or
+                                                       rows/columns/cell of 
matrix. (Eg: 'p alpha' or 'p A' or 'p A[1,]')
+</code></pre>
+
+<p>Below is sample print output for the same variables used in previous 
section.</p>
+
+<pre><code>(SystemMLdb) p A
+0.6911 0.0533  0.7659  0.9130  0.1196  
+0.8153 0.6145  0.5440  0.2916  0.7330  
+0.0520 0.9484  0.2044  0.5571  0.6952  
+0.7422 0.4134  0.5388  0.1192  0.8733  
+0.6413 0.1825  0.4818  0.9019  0.7446  
+0.5984 0.8577  0.7151  0.3002  0.2228  
+0.0090 0.1429  0.2569  0.1421  0.1357  
+0.6778 0.8078  0.5075  0.0085  0.5159  
+0.8835 0.5621  0.7637  0.4362  0.4392  
+0.6108 0.5600  0.6140  0.0163  0.8640  
+(SystemMLdb) p B
+0.4141 0.9905  0.1642  0.7545  
+0.5733 0.1489  0.1204  0.5375  
+0.5202 0.9833  0.3421  0.7099  
+0.5846 0.7585  0.9751  0.1174  
+0.8431 0.5806  0.4122  0.3694  
+(SystemMLdb) p D
+D = 25.28558886582987
+(SystemMLdb) 
+</code></pre>
+
+<p>To display a specific element of a matrix, use [row,column] notation.</p>
+
+<pre><code>(SystemMLdb) p A[1,1]
+0.6911
+(SystemMLdb) p A[10,5]
+0.8640
+(SystemMLdb)  
+</code></pre>
+
+<p>Specific rows or columns of a matrix can also be displayed.  The below 
examples show the first row and the fifth column of matrix A.</p>
+
+<pre><code>(SystemMLdb) p A[1,]
+0.6911 0.0533  0.7659  0.9130  0.1196  
+(SystemMLdb) p A[,5]
+0.1196 
+0.7330 
+0.6952 
+0.8733 
+0.7446 
+0.2228 
+0.1357 
+0.5159 
+0.4392 
+0.8640 
+(SystemMLdb)
+</code></pre>
+
+<h3 id="set">Set</h3>
+
+<p>The set command is used for modifying variable contents.</p>
+
+<pre><code>set &lt;varName value&gt;                                set value 
of a scalar or specified cell of a matrix variable. (Eg:
+                                                   'set alpha 0.1' or 'set 
A[1,2] 20')
+</code></pre>
+
+<p>The following example modifies the first cell in matrix A.</p>
+
+<pre><code>(SystemMLdb) set A[1,1] 0.3299
+A[1,1] = 0.3299
+(SystemMLdb)  
+</code></pre>
+
+<p>This example updates scalar D.  Note an equals sign is not needed when 
setting a variable.</p>
+
+<pre><code>(SystemMLdb) set D 25.0
+D = 25.0
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="info-frame">Info frame</h3>
+
+<p>In addition to being used for displaying breakpoints, the i command is used 
for displaying frames.</p>
+
+<pre><code>i,info frame                                       show all frames
+</code></pre>
+
+<p>So if our test.xml script was executed up to line 4, then the following 
frame information is shown.</p>
+
+<pre><code>(SystemMLdb) i frame
+Current frame id: 0
+  Current program counter at .defaultNS::main instID -1: (line 4)
+  Local variables:
+    Variable name                            Variable value                    
      
+    A                                        Matrix: 
scratch_space//_p48857_9.30.252.162//_t0/temp1_1, [10 x 5, nnz=50, blocks (1000 
x 1000)], binaryblock, dirty
+    B                                        Matrix: 
scratch_space//_p48857_9.30.252.162//_t0/temp2_2, [5 x 4, nnz=20, blocks (1000 
x 1000)], binaryblock, dirty
+    D                                        25.28558886582987                 
      
+(SystemMLdb) 
+</code></pre>
+
+<p>Note only variables that are in scope are included (e.g., the variable C is 
not part of the frame since not yet in scope).</p>
+
+<h2 id="advanced-debugger-commands">Advanced Debugger Commands</h2>
+
+<p>This section describes commands for advanced users.  The same test.dml 
script is used for showing sample command usage.</p>
+
+<pre><code>A = rand (rows=10, cols=5);
+B = rand (rows=5, cols=4);
+D = sum(A);
+print("Sum(A)=" + D);
+C = A %*% B;
+write(C, "output.csv", format="csv");
+</code></pre>
+
+<h3 id="list-instruction">List Instruction</h3>
+
+<p>The li command can be used to display lower-level instructions along with 
the source lines of the loaded script.</p>
+
+<pre><code>li,listi &lt;[next numlines] | [prev numlines] | [all]&gt;   
display corresponding instructions for DML script source lines.
+                                                       Default: numlines = 10  
(for advanced users)
+</code></pre>
+
+<p>For example:</p>
+
+<pre><code>(SystemMLdb) li
+line    1: A = rand (rows=10, cols=5);
+        id   -1: CP createvar _mVar1 
scratch_space//_p1939_9.30.252.162//_t0/temp1 true binaryblock 10 5 1000 1000 50
+        id   -1: CP rand 10 5 1000 1000 0.0 1.0 1.0 -1 uniform 1.0 4 
_mVar1.MATRIX.DOUBLE
+        id   -1: CP cpvar _mVar1 A
+        id   -1: CP rmvar _mVar1
+line    2: B = rand (rows=5, cols=4);
+        id   -1: CP createvar _mVar2 
scratch_space//_p1939_9.30.252.162//_t0/temp2 true binaryblock 5 4 1000 1000 20
+        id   -1: CP rand 5 4 1000 1000 0.0 1.0 1.0 -1 uniform 1.0 4 
_mVar2.MATRIX.DOUBLE
+        id   -1: CP cpvar _mVar2 B
+        id   -1: CP rmvar _mVar2
+line    3: D = sum(A);
+        id   -1: CP uak+ A.MATRIX.DOUBLE _Var3.SCALAR.DOUBLE
+        id   -1: CP assignvar _Var3.SCALAR.DOUBLE.false D.SCALAR.DOUBLE
+        id   -1: CP rmvar _Var3
+line    4: print("Sum(A)=" + D);
+        id   -1: CP + Sum(A)=.SCALAR.STRING.true D.SCALAR.DOUBLE.false 
_Var4.SCALAR.STRING
+        id   -1: CP print _Var4.SCALAR.STRING.false _Var5.SCALAR.STRING
+        id   -1: CP rmvar _Var4
+        id   -1: CP rmvar _Var5
+        id   -1: CP rmvar D
+line    5: C = A %*% B;
+        id   -1: CP createvar _mVar6 
scratch_space//_p1939_9.30.252.162//_t0/temp3 true binaryblock 10 4 1000 1000 -1
+        id   -1: CP ba+* A.MATRIX.DOUBLE B.MATRIX.DOUBLE _mVar6.MATRIX.DOUBLE 4
+        id   -1: CP cpvar _mVar6 C
+        id   -1: CP rmvar _mVar6
+        id   -1: CP rmvar A
+        id   -1: CP rmvar B
+line    6: write(C, "output.csv", format="csv");
+        id   -1: CP write C.MATRIX.DOUBLE output.csv.SCALAR.STRING.true 
csv.SCALAR.STRING.true false , false
+        id   -1: CP rmvar C
+(SystemMLdb) 
+</code></pre>
+
+<h3 id="step-instruction">Step Instruction</h3>
+
+<p>The si command can be used to step through the lower level instructions of 
an individual source line in a DML script.</p>
+
+<pre><code>si,stepi                                               next runtime 
instruction rather than DML source lines (for advanced
+                                                       users)
+</code></pre>
+
+<p>The first DML source line in test.dml consists of four instructions.</p>
+
+<pre><code>(SystemMLdb) li next 0
+line    1: A = rand (rows=10, cols=5);
+        id   -1: CP createvar _mVar1 
scratch_space//_p34473_9.30.252.162//_t0/temp1 true binaryblock 10 5 1000 1000 
50
+        id   -1: CP rand 10 5 1000 1000 0.0 1.0 1.0 -1 uniform 1.0 4 
_mVar1.MATRIX.DOUBLE
+        id   -1: CP cpvar _mVar1 A
+        id   -1: CP rmvar _mVar1
+(SystemMLdb) 
+</code></pre>
+
+<p>Type si to step through each individual instruction.</p>
+
+<pre><code>(SystemMLdb) si
+Step instruction reached at .defaultNS::main instID -1: (line 1).
+1    A = rand (rows=10, cols=5);
+(SystemMLdb) si
+Step instruction reached at .defaultNS::main instID -1: (line 1).
+1    A = rand (rows=10, cols=5);
+(SystemMLdb) si
+Step instruction reached at .defaultNS::main instID -1: (line 1).
+1    A = rand (rows=10, cols=5);
+(SystemMLdb) si
+Step instruction reached at .defaultNS::main instID -1: (line 1).
+1    A = rand (rows=10, cols=5);
+(SystemMLdb)
+</code></pre>
+
+<p>Typing si again starts executing instructions of the next DML source 
line.</p>
+
+<pre><code>(SystemMLdb) si
+Step instruction reached at .defaultNS::main instID -1: (line 2).
+2    B = rand (rows=5, cols=4);
+(SystemMLdb)
+</code></pre>
+
+<hr />
+
+
+        </div> <!-- /container -->
+
+        
+
+        <script src="js/vendor/jquery-1.12.0.min.js"></script>
+        <script src="js/vendor/bootstrap.min.js"></script>
+        <script src="js/vendor/anchor.min.js"></script>
+        <script src="js/main.js"></script>
+        
+
+
+
+
+        <!-- Analytics -->
+        <script>
+            
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+            
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+            
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+            ga('create', 'UA-71553733-1', 'auto');
+            ga('send', 'pageview');
+        </script>
+
+
+
+        <!-- MathJax Section -->
+        <script type="text/x-mathjax-config">
+            MathJax.Hub.Config({
+                TeX: { equationNumbers: { autoNumber: "AMS" } }
+            });
+        </script>
+        <script>
+            // Note that we load MathJax this way to work with local file 
(file://), HTTP and HTTPS.
+            // We could use "//cdn.mathjax...", but that won't support 
"file://".
+            (function(d, script) {
+                script = d.createElement('script');
+                script.type = 'text/javascript';
+                script.async = true;
+                script.onload = function(){
+                    MathJax.Hub.Config({
+                        tex2jax: {
+                            inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ],
+                            displayMath: [ ["$$","$$"], ["\\[", "\\]"] ],
+                            processEscapes: true,
+                            skipTags: ['script', 'noscript', 'style', 
'textarea', 'pre']
+                        }
+                    });
+                };
+                script.src = ('https:' == document.location.protocol ? 
'https://' : 'http://') +
+                    
'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
+                d.getElementsByTagName('head')[0].appendChild(script);
+            }(document));
+        </script>
+    </body>
+</html>

Added: systemml/site/docs/1.1.0/deep-learning.html
URL: 
http://svn.apache.org/viewvc/systemml/site/docs/1.1.0/deep-learning.html?rev=1828046&view=auto
==============================================================================
--- systemml/site/docs/1.1.0/deep-learning.html (added)
+++ systemml/site/docs/1.1.0/deep-learning.html Fri Mar 30 04:31:05 2018
@@ -0,0 +1,455 @@
+<!DOCTYPE html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
+    <head>
+        <title>Deep Learning with SystemML - SystemML 1.1.0</title>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+        
+        <meta name="description" content="Deep Learning with SystemML">
+        
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" href="css/bootstrap.min.css">
+        <link rel="stylesheet" href="css/main.css">
+        <link rel="stylesheet" href="css/pygments-default.css">
+        <link rel="shortcut icon" href="img/favicon.png">
+    </head>
+    <body>
+        <!--[if lt IE 7]>
+            <p class="chromeframe">You are using an outdated browser. <a 
href="http://browsehappy.com/";>Upgrade your browser today</a> or <a 
href="http://www.google.com/chromeframe/?redirect=true";>install Google Chrome 
Frame</a> to better experience this site.</p>
+        <![endif]-->
+
+        <header class="navbar navbar-default navbar-fixed-top" id="topbar">
+            <div class="container">
+                <div class="navbar-header">
+                    <div class="navbar-brand brand projectlogo">
+                        <a href="http://systemml.apache.org/";><img 
class="logo" src="img/systemml-logo.png" alt="Apache SystemML" title="Apache 
SystemML"/></a>
+                    </div>
+                    <div class="navbar-brand brand projecttitle">
+                        <a href="http://systemml.apache.org/";>Apache 
SystemML<sup id="trademark">™</sup></a><br/>
+                        <span class="version">1.1.0</span>
+                    </div>
+                    <button type="button" class="navbar-toggle collapsed" 
data-toggle="collapse" data-target=".navbar-collapse">
+                        <span class="sr-only">Toggle navigation</span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </button>
+                </div>
+                <nav class="navbar-collapse collapse">
+                    <ul class="nav navbar-nav navbar-right">
+                        <li><a href="index.html">Overview</a></li>
+                        <li><a 
href="https://github.com/apache/systemml";>GitHub</a></li>
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Documentation<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>Running SystemML:</b></li>
+                                <li><a 
href="https://github.com/apache/systemml";>SystemML GitHub README</a></li>
+                                <li><a 
href="spark-mlcontext-programming-guide.html">Spark MLContext</a></li>
+                                <li><a href="spark-batch-mode.html">Spark 
Batch Mode</a>
+                                <li><a href="hadoop-batch-mode.html">Hadoop 
Batch Mode</a>
+                                <li><a href="standalone-guide.html">Standalone 
Guide</a></li>
+                                <li><a href="jmlc.html">Java Machine Learning 
Connector (JMLC)</a>
+                                <li class="divider"></li>
+                                <li><b>Language Guides:</b></li>
+                                <li><a href="dml-language-reference.html">DML 
Language Reference</a></li>
+                                <li><a 
href="beginners-guide-to-dml-and-pydml.html">Beginner's Guide to DML and 
PyDML</a></li>
+                                <li><a 
href="beginners-guide-python.html">Beginner's Guide for Python Users</a></li>
+                                <li><a href="python-reference.html">Reference 
Guide for Python Users</a></li>
+                                <li class="divider"></li>
+                                <li><b>ML Algorithms:</b></li>
+                                <li><a 
href="algorithms-reference.html">Algorithms Reference</a></li>
+                                <li class="divider"></li>
+                                <li><b>Tools:</b></li>
+                                <li><a href="debugger-guide.html">Debugger 
Guide</a></li>
+                                <li><a 
href="developer-tools-systemml.html">IDE Guide</a></li>
+                                <li class="divider"></li>
+                                <li><b>Other:</b></li>
+                                <li><a 
href="contributing-to-systemml.html">Contributing to SystemML</a></li>
+                                <li><a href="engine-dev-guide.html">Engine 
Developer Guide</a></li>
+                                <li><a 
href="troubleshooting-guide.html">Troubleshooting Guide</a></li>
+                                <li><a href="release-process.html">Release 
Process</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">API Docs<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><a 
href="./api/java/index.html">Java</a></li>
+                                <li><a 
href="./api/python/index.html">Python</a></li>
+                            </ul>
+                        </li>
+                        
+                        <li class="dropdown">
+                            <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">Issues<b class="caret"></b></a>
+                            <ul class="dropdown-menu" role="menu">
+                                <li><b>JIRA:</b></li>
+                                <li><a 
href="https://issues.apache.org/jira/browse/SYSTEMML";>SystemML JIRA</a></li>
+                                
+                            </ul>
+                        </li>
+                    </ul>
+                </nav>
+            </div>
+        </header>
+
+        <div class="container" id="content">
+          
+            <h1 class="title">Deep Learning with SystemML</h1>
+          
+
+          <!--
+
+-->
+
+<ul id="markdown-toc">
+  <li><a href="#introduction" id="markdown-toc-introduction">Introduction</a>  
  <ul>
+      <li><a href="#mllearn-api" id="markdown-toc-mllearn-api">mllearn API</a> 
       <ul>
+          <li><a href="#training-functions" 
id="markdown-toc-training-functions">Training functions</a></li>
+          <li><a href="#prediction-functions" 
id="markdown-toc-prediction-functions">Prediction functions</a></li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <li><a href="#training-lenet-on-the-mnist-dataset" 
id="markdown-toc-training-lenet-on-the-mnist-dataset">Training Lenet on the 
MNIST dataset</a></li>
+  <li><a href="#prediction-using-a-pretrained-resnet-50" 
id="markdown-toc-prediction-using-a-pretrained-resnet-50">Prediction using a 
pretrained ResNet-50</a></li>
+</ul>
+
+<p><br /></p>
+
+<h1 id="introduction">Introduction</h1>
+
+<p>There are three different ways to implement a Deep Learning model in 
SystemML:
+1. Using the <a 
href="https://github.com/apache/systemml/tree/master/scripts/nn";>DML-bodied NN 
library</a>: This library allows the user to exploit full flexibility of <a 
href="http://apache.github.io/systemml/dml-language-reference";>DML language</a> 
to implement your neural network.
+2. Using the experimental <a 
href="http://apache.github.io/systemml/beginners-guide-caffe2dml.html";>Caffe2DML
 API</a>: This API allows a model expressed in Caffe&#8217;s proto format to be 
imported into SystemML. This API <strong>doesnot</strong> require Caffe to be 
installed on your SystemML.
+3. Using the experimental <a 
href="http://apache.github.io/systemml/beginners-guide-keras2dml.html";>Keras2DML
 API</a>: This API allows a model expressed in Keras&#8217;s API to be imported 
into SystemML. However, this API requires Keras to be installed on your 
driver.</p>
+
+<table>
+  <thead>
+    <tr>
+      <th>&#160;</th>
+      <th>NN library</th>
+      <th>Caffe2DML</th>
+      <th>Keras2DML</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>External dependency</td>
+      <td>None</td>
+      <td>None</td>
+      <td>Keras</td>
+    </tr>
+    <tr>
+      <td>Ability to add custom layers</td>
+      <td>Yes</td>
+      <td>No</td>
+      <td>No</td>
+    </tr>
+    <tr>
+      <td>The user needs to know</td>
+      <td><a 
href="http://apache.github.io/systemml/dml-language-reference";>DML</a></td>
+      <td><a 
href="http://apache.github.io/systemml/reference-guide-caffe2dml#layers-supported-in-caffe2dml";>Caffe&#8217;s
 proto API</a></td>
+      <td><a href="https://keras.io/models/about-keras-models/";>Keras&#8217; 
API</a></td>
+    </tr>
+    <tr>
+      <td>Can be invoked using pyspark</td>
+      <td>Yes. Please see <a 
href="http://apache.github.io/systemml/spark-mlcontext-programming-guide";>Python
 MLContext API</a></td>
+      <td>Yes.</td>
+      <td>Yes.</td>
+    </tr>
+    <tr>
+      <td>Can be invoked using spark-shell</td>
+      <td>Yes. Please see <a 
href="http://apache.github.io/systemml/spark-mlcontext-programming-guide";>Scala 
MLContext API</a></td>
+      <td>Limited support</td>
+      <td>No</td>
+    </tr>
+    <tr>
+      <td>Can be invoked via command-line or JMLC API</td>
+      <td>Yes</td>
+      <td>No</td>
+      <td>No</td>
+    </tr>
+    <tr>
+      <td>GPU and <a 
href="http://apache.github.io/systemml/native-backend.html";>native BLAS</a> 
support</td>
+      <td>Yes</td>
+      <td>Yes</td>
+      <td>Yes</td>
+    </tr>
+    <tr>
+      <td>Part of SystemML&#8217;s <a 
href="http://apache.github.io/systemml/python-reference.html#mllearn-api";>mllearn</a>
 API</td>
+      <td>No</td>
+      <td>Yes</td>
+      <td>Yes</td>
+    </tr>
+  </tbody>
+</table>
+
+<h2 id="mllearn-api">mllearn API</h2>
+
+<p>Before we go any further, let us briefly discuss the training and 
prediction functions in the mllearn API (i.e. Caffe2DML and Keras2DML).</p>
+
+<h3 id="training-functions">Training functions</h3>
+
+<div class="codetabs">
+<div data-lang="sklearn way">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="c"># Input: Two Python objects (X_train, 
y_train) of type numpy, pandas or scipy.</span>
+<span class="n">model</span><span class="o">.</span><span 
class="n">fit</span><span class="p">(</span><span class="n">X_train</span><span 
class="p">,</span> <span class="n">y_train</span><span 
class="p">)</span></code></pre></div>
+
+  </div>
+<div data-lang="mllib way">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="c"># Input: One LabeledPoint DataFrame with 
atleast two columns: features (of type Vector) and labels.</span>
+<span class="n">model</span><span class="o">.</span><span 
class="n">fit</span><span class="p">(</span><span class="n">X_df</span><span 
class="p">)</span></code></pre></div>
+
+  </div>
+</div>
+
+<h3 id="prediction-functions">Prediction functions</h3>
+
+<div class="codetabs">
+<div data-lang="sklearn way">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="c"># Input: One Python object (X_test) of type 
numpy, pandas or scipy.</span>
+<span class="n">model</span><span class="o">.</span><span 
class="n">predict</span><span class="p">(</span><span 
class="n">X_test</span><span class="p">)</span>
+<span class="c"># OR model.score(X_test, y_test)</span></code></pre></div>
+
+  </div>
+<div data-lang="mllib way">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="c"># Input: One LabeledPoint DataFrame 
(df_test) with atleast one column: features (of type Vector).</span>
+<span class="n">model</span><span class="o">.</span><span 
class="n">transform</span><span class="p">(</span><span 
class="n">df_test</span><span class="p">)</span></code></pre></div>
+
+  </div>
+</div>
+
+<p>Please note that when training using mllearn API (i.e. 
<code>model.fit(X_df)</code>), SystemML 
+expects that labels have been converted to 1-based value.
+This avoids unnecessary decoding overhead for large dataset if the label 
columns has already been decoded.
+For scikit-learn API, there is no such requirement.</p>
+
+<h1 id="training-lenet-on-the-mnist-dataset">Training Lenet on the MNIST 
dataset</h1>
+
+<p>Download the MNIST dataset using <a 
href="https://pypi.python.org/pypi/mlxtend";>mlxtend package</a>.</p>
+
+<p><code>python
+from mlxtend.data import mnist_data
+import numpy as np
+from sklearn.utils import shuffle
+# Download the MNIST dataset
+X, y = mnist_data()
+X, y = shuffle(X, y)
+# Split the data into training and test
+n_samples = len(X)
+X_train = X[:int(.9 * n_samples)]
+y_train = y[:int(.9 * n_samples)]
+X_test = X[int(.9 * n_samples):]
+y_test = y[int(.9 * n_samples):]
+</code></p>
+
+<div class="codetabs">
+
+<div data-lang="NN library">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="kn">from</span> <span 
class="nn">systemml</span> <span class="kn">import</span> <span 
class="n">MLContext</span><span class="p">,</span> <span class="n">dml</span>
+
+<span class="n">ml</span> <span class="o">=</span> <span 
class="n">MLContext</span><span class="p">(</span><span 
class="n">sc</span><span class="p">)</span>
+<span class="n">ml</span><span class="o">.</span><span 
class="n">setStatistics</span><span class="p">(</span><span 
class="bp">True</span><span class="p">)</span>
+<span class="c"># ml.setConfigProperty("sysml.native.blas", "auto")</span>
+<span class="c"># ml.setGPU(True).setForceGPU(True)</span>
+<span class="n">script</span> <span class="o">=</span> <span class="s">"""
+  source("nn/examples/mnist_lenet.dml") as mnist_lenet
+
+  # Scale images to [-1,1], and one-hot encode the labels
+  images = (images / 255) * 2 - 1
+  n = nrow(images)
+  labels = table(seq(1, n), labels+1, n, 10)
+
+  # Split into training (4000 examples) and validation (4000 examples)
+  X = images[501:nrow(images),]
+  X_val = images[1:500,]
+  y = labels[501:nrow(images),]
+  y_val = labels[1:500,]
+
+  # Train the model to produce weights &amp; biases.
+  [W1, b1, W2, b2, W3, b3, W4, b4] = mnist_lenet::train(X, y, X_val, y_val, C, 
Hin, Win, epochs)
+"""</span>
+<span class="n">out</span> <span class="o">=</span> <span 
class="p">(</span><span class="s">'W1'</span><span class="p">,</span> <span 
class="s">'b1'</span><span class="p">,</span> <span class="s">'W2'</span><span 
class="p">,</span> <span class="s">'b2'</span><span class="p">,</span> <span 
class="s">'W3'</span><span class="p">,</span> <span class="s">'b3'</span><span 
class="p">,</span> <span class="s">'W4'</span><span class="p">,</span> <span 
class="s">'b4'</span><span class="p">)</span>
+<span class="n">prog</span> <span class="o">=</span> <span 
class="p">(</span><span class="n">dml</span><span class="p">(</span><span 
class="n">script</span><span class="p">)</span><span class="o">.</span><span 
class="nb">input</span><span class="p">(</span><span 
class="n">images</span><span class="o">=</span><span 
class="n">X_train</span><span class="p">,</span> <span 
class="n">labels</span><span class="o">=</span><span 
class="n">y_train</span><span class="o">.</span><span 
class="n">reshape</span><span class="p">((</span><span class="o">-</span><span 
class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span 
class="p">)),</span> <span class="n">epochs</span><span class="o">=</span><span 
class="mi">1</span><span class="p">,</span> <span class="n">C</span><span 
class="o">=</span><span class="mi">1</span><span class="p">,</span> <span 
class="n">Hin</span><span class="o">=</span><span class="mi">28</span><span 
class="p">,</span> <span class="n">Win</span><span class="o">
 =</span><span class="mi">28</span><span class="p">)</span>
+                   <span class="o">.</span><span class="n">output</span><span 
class="p">(</span><span class="o">*</span><span class="n">out</span><span 
class="p">))</span>
+
+<span class="n">W1</span><span class="p">,</span> <span 
class="n">b1</span><span class="p">,</span> <span class="n">W2</span><span 
class="p">,</span> <span class="n">b2</span><span class="p">,</span> <span 
class="n">W3</span><span class="p">,</span> <span class="n">b3</span><span 
class="p">,</span> <span class="n">W4</span><span class="p">,</span> <span 
class="n">b4</span> <span class="o">=</span> <span class="n">ml</span><span 
class="o">.</span><span class="n">execute</span><span class="p">(</span><span 
class="n">prog</span><span class="p">)</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span class="o">*</span><span 
class="n">out</span><span class="p">)</span>
+
+<span class="n">script_predict</span> <span class="o">=</span> <span 
class="s">"""
+  source("nn/examples/mnist_lenet.dml") as mnist_lenet
+
+  # Scale images to [-1,1]
+  X_test = (X_test / 255) * 2 - 1
+
+  # Predict
+  y_prob = mnist_lenet::predict(X_test, C, Hin, Win, W1, b1, W2, b2, W3, b3, 
W4, b4)
+  y_pred = rowIndexMax(y_prob) - 1
+"""</span>
+<span class="n">prog</span> <span class="o">=</span> <span 
class="p">(</span><span class="n">dml</span><span class="p">(</span><span 
class="n">script_predict</span><span class="p">)</span><span 
class="o">.</span><span class="nb">input</span><span class="p">(</span><span 
class="n">X_test</span><span class="o">=</span><span 
class="n">X_test</span><span class="p">,</span> <span class="n">C</span><span 
class="o">=</span><span class="mi">1</span><span class="p">,</span> <span 
class="n">Hin</span><span class="o">=</span><span class="mi">28</span><span 
class="p">,</span> <span class="n">Win</span><span class="o">=</span><span 
class="mi">28</span><span class="p">,</span> <span class="n">W1</span><span 
class="o">=</span><span class="n">W1</span><span class="p">,</span> <span 
class="n">b1</span><span class="o">=</span><span class="n">b1</span><span 
class="p">,</span>
+                                  <span class="n">W2</span><span 
class="o">=</span><span class="n">W2</span><span class="p">,</span> <span 
class="n">b2</span><span class="o">=</span><span class="n">b2</span><span 
class="p">,</span> <span class="n">W3</span><span class="o">=</span><span 
class="n">W3</span><span class="p">,</span> <span class="n">b3</span><span 
class="o">=</span><span class="n">b3</span><span class="p">,</span> <span 
class="n">W4</span><span class="o">=</span><span class="n">W4</span><span 
class="p">,</span> <span class="n">b4</span><span class="o">=</span><span 
class="n">b4</span><span class="p">)</span>
+                           <span class="o">.</span><span 
class="n">output</span><span class="p">(</span><span 
class="s">"y_pred"</span><span class="p">))</span>
+
+<span class="n">y_pred</span> <span class="o">=</span> <span 
class="n">ml</span><span class="o">.</span><span class="n">execute</span><span 
class="p">(</span><span class="n">prog</span><span class="p">)</span><span 
class="o">.</span><span class="n">get</span><span class="p">(</span><span 
class="s">"y_pred"</span><span class="p">)</span><span class="o">.</span><span 
class="n">toNumPy</span><span class="p">()</span></code></pre></div>
+
+  </div>
+
+<div data-lang="Caffe2DML">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="kn">from</span> <span 
class="nn">systemml.mllearn</span> <span class="kn">import</span> <span 
class="n">Caffe2DML</span>
+<span class="kn">import</span> <span class="nn">urllib</span>
+
+<span class="c"># Download the Lenet network</span>
+<span class="n">urllib</span><span class="o">.</span><span 
class="n">urlretrieve</span><span class="p">(</span><span 
class="s">'https://raw.githubusercontent.com/apache/systemml/master/scripts/nn/examples/caffe2dml/models/mnist_lenet/lenet.proto'</span><span
 class="p">,</span> <span class="s">'lenet.proto'</span><span class="p">)</span>
+<span class="n">urllib</span><span class="o">.</span><span 
class="n">urlretrieve</span><span class="p">(</span><span 
class="s">'https://raw.githubusercontent.com/apache/systemml/master/scripts/nn/examples/caffe2dml/models/mnist_lenet/lenet_solver.proto'</span><span
 class="p">,</span> <span class="s">'lenet_solver.proto'</span><span 
class="p">)</span>
+<span class="c"># Train Lenet On MNIST using scikit-learn like API</span>
+
+<span class="c"># MNIST dataset contains 28 X 28 gray-scale (number of 
channel=1).</span>
+<span class="n">lenet</span> <span class="o">=</span> <span 
class="n">Caffe2DML</span><span class="p">(</span><span 
class="n">spark</span><span class="p">,</span> <span 
class="n">solver</span><span class="o">=</span><span 
class="s">'lenet_solver.proto'</span><span class="p">,</span> <span 
class="n">input_shape</span><span class="o">=</span><span 
class="p">(</span><span class="mi">1</span><span class="p">,</span> <span 
class="mi">28</span><span class="p">,</span> <span class="mi">28</span><span 
class="p">))</span>
+<span class="n">lenet</span><span class="o">.</span><span 
class="n">setStatistics</span><span class="p">(</span><span 
class="bp">True</span><span class="p">)</span>
+<span class="c"># lenet.setConfigProperty("sysml.native.blas", "auto")</span>
+<span class="c"># lenet.setGPU(True).setForceGPU(True)</span>
+
+<span class="c"># Since Caffe2DML is a mllearn API, it allows for scikit-learn 
like method for training.</span>
+<span class="n">lenet</span><span class="o">.</span><span 
class="n">fit</span><span class="p">(</span><span class="n">X_train</span><span 
class="p">,</span> <span class="n">y_train</span><span class="p">)</span>
+<span class="c"># Either perform prediction: lenet.predict(X_test) or 
scoring:</span>
+<span class="n">lenet</span><span class="o">.</span><span 
class="n">score</span><span class="p">(</span><span 
class="n">X_test</span><span class="p">,</span> <span 
class="n">y_test</span><span class="p">)</span></code></pre></div>
+
+  </div>
+
+<div data-lang="Keras2DML">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="kn">from</span> <span 
class="nn">keras.models</span> <span class="kn">import</span> <span 
class="n">Sequential</span>
+<span class="kn">from</span> <span class="nn">keras.layers</span> <span 
class="kn">import</span> <span class="n">Input</span><span class="p">,</span> 
<span class="n">Dense</span><span class="p">,</span> <span 
class="n">Conv2D</span><span class="p">,</span> <span 
class="n">MaxPooling2D</span><span class="p">,</span> <span 
class="n">Dropout</span><span class="p">,</span><span class="n">Flatten</span>
+<span class="kn">from</span> <span class="nn">keras</span> <span 
class="kn">import</span> <span class="n">backend</span> <span 
class="k">as</span> <span class="n">K</span>
+<span class="kn">from</span> <span class="nn">keras.models</span> <span 
class="kn">import</span> <span class="n">Model</span>
+<span class="n">input_shape</span> <span class="o">=</span> <span 
class="p">(</span><span class="mi">1</span><span class="p">,</span><span 
class="mi">28</span><span class="p">,</span><span class="mi">28</span><span 
class="p">)</span> <span class="k">if</span> <span class="n">K</span><span 
class="o">.</span><span class="n">image_data_format</span><span 
class="p">()</span> <span class="o">==</span> <span 
class="s">'channels_first'</span> <span class="k">else</span> <span 
class="p">(</span><span class="mi">28</span><span class="p">,</span><span 
class="mi">28</span><span class="p">,</span> <span class="mi">1</span><span 
class="p">)</span>
+<span class="n">keras_model</span> <span class="o">=</span> <span 
class="n">Sequential</span><span class="p">()</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Conv2D</span><span 
class="p">(</span><span class="mi">32</span><span class="p">,</span> <span 
class="n">kernel_size</span><span class="o">=</span><span 
class="p">(</span><span class="mi">5</span><span class="p">,</span> <span 
class="mi">5</span><span class="p">),</span> <span 
class="n">activation</span><span class="o">=</span><span 
class="s">'relu'</span><span class="p">,</span> <span 
class="n">input_shape</span><span class="o">=</span><span 
class="n">input_shape</span><span class="p">,</span> <span 
class="n">padding</span><span class="o">=</span><span 
class="s">'same'</span><span class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span 
class="n">MaxPooling2D</span><span class="p">(</span><span 
class="n">pool_size</span><span class="o">=</span><span class="p">(</span><span 
class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span 
class="p">)))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Conv2D</span><span 
class="p">(</span><span class="mi">64</span><span class="p">,</span> <span 
class="p">(</span><span class="mi">5</span><span class="p">,</span> <span 
class="mi">5</span><span class="p">),</span> <span 
class="n">activation</span><span class="o">=</span><span 
class="s">'relu'</span><span class="p">,</span> <span 
class="n">padding</span><span class="o">=</span><span 
class="s">'same'</span><span class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span 
class="n">MaxPooling2D</span><span class="p">(</span><span 
class="n">pool_size</span><span class="o">=</span><span class="p">(</span><span 
class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span 
class="p">)))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Flatten</span><span 
class="p">())</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Dense</span><span 
class="p">(</span><span class="mi">512</span><span class="p">,</span> <span 
class="n">activation</span><span class="o">=</span><span 
class="s">'relu'</span><span class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Dropout</span><span 
class="p">(</span><span class="mf">0.5</span><span class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">add</span><span class="p">(</span><span class="n">Dense</span><span 
class="p">(</span><span class="mi">10</span><span class="p">,</span> <span 
class="n">activation</span><span class="o">=</span><span 
class="s">'softmax'</span><span class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="n">summary</span><span class="p">()</span>
+
+<span class="c"># Scale the input features</span>
+<span class="n">scale</span> <span class="o">=</span> <span 
class="mf">0.00390625</span>
+<span class="n">X_train</span> <span class="o">=</span> <span 
class="n">X_train</span><span class="o">*</span><span class="n">scale</span>
+<span class="n">X_test</span> <span class="o">=</span> <span 
class="n">X_test</span><span class="o">*</span><span class="n">scale</span>
+
+<span class="kn">from</span> <span class="nn">systemml.mllearn</span> <span 
class="kn">import</span> <span class="n">Keras2DML</span>
+<span class="n">sysml_model</span> <span class="o">=</span> <span 
class="n">Keras2DML</span><span class="p">(</span><span 
class="n">spark</span><span class="p">,</span> <span 
class="n">keras_model</span><span class="p">,</span> <span 
class="n">input_shape</span><span class="o">=</span><span 
class="p">(</span><span class="mi">1</span><span class="p">,</span><span 
class="mi">28</span><span class="p">,</span><span class="mi">28</span><span 
class="p">),</span> <span class="n">weights</span><span class="o">=</span><span 
class="s">'weights_dir'</span><span class="p">)</span>
+<span class="c"># sysml_model.setConfigProperty("sysml.native.blas", 
"auto")</span>
+<span class="c"># sysml_model.setGPU(True).setForceGPU(True)</span>
+<span class="n">sysml_model</span><span class="o">.</span><span 
class="n">summary</span><span class="p">()</span>
+<span class="n">sysml_model</span><span class="o">.</span><span 
class="n">fit</span><span class="p">(</span><span class="n">X_train</span><span 
class="p">,</span> <span class="n">y_train</span><span class="p">)</span>
+<span class="n">sysml_model</span><span class="o">.</span><span 
class="n">score</span><span class="p">(</span><span 
class="n">X_test</span><span class="p">,</span> <span 
class="n">y_test</span><span class="p">)</span></code></pre></div>
+
+  </div>
+
+</div>
+
+<h1 id="prediction-using-a-pretrained-resnet-50">Prediction using a pretrained 
ResNet-50</h1>
+
+<div class="codetabs">
+
+<div data-lang="NN library">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="n">Will</span> <span class="n">be</span> <span 
class="n">added</span> <span class="n">soon</span> <span 
class="o">...</span></code></pre></div>
+
+  </div>
+
+<div data-lang="Caffe2DML">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="n">Will</span> <span class="n">be</span> <span 
class="n">added</span> <span class="n">soon</span> <span 
class="o">...</span></code></pre></div>
+
+  </div>
+
+<div data-lang="Keras2DML">
+
+    <div class="highlight"><pre><code class="language-python" 
data-lang="python"><span class="kn">from</span> <span 
class="nn">systemml.mllearn</span> <span class="kn">import</span> <span 
class="n">Keras2DML</span>
+<span class="kn">import</span> <span class="nn">systemml</span> <span 
class="k">as</span> <span class="n">sml</span>
+<span class="kn">import</span> <span class="nn">keras</span><span 
class="p">,</span> <span class="n">urllib</span>
+<span class="kn">from</span> <span class="nn">PIL</span> <span 
class="kn">import</span> <span class="n">Image</span>
+<span class="kn">from</span> <span 
class="nn">keras.applications.resnet50</span> <span class="kn">import</span> 
<span class="n">preprocess_input</span><span class="p">,</span> <span 
class="n">decode_predictions</span><span class="p">,</span> <span 
class="n">ResNet50</span>
+
+<span class="n">keras_model</span> <span class="o">=</span> <span 
class="n">ResNet50</span><span class="p">(</span><span 
class="n">weights</span><span class="o">=</span><span 
class="s">'imagenet'</span><span class="p">,</span><span 
class="n">include_top</span><span class="o">=</span><span 
class="bp">True</span><span class="p">,</span><span 
class="n">pooling</span><span class="o">=</span><span 
class="s">'None'</span><span class="p">,</span><span 
class="n">input_shape</span><span class="o">=</span><span 
class="p">(</span><span class="mi">224</span><span class="p">,</span><span 
class="mi">224</span><span class="p">,</span><span class="mi">3</span><span 
class="p">))</span>
+<span class="n">keras_model</span><span class="o">.</span><span 
class="nb">compile</span><span class="p">(</span><span 
class="n">optimizer</span><span class="o">=</span><span 
class="s">'sgd'</span><span class="p">,</span> <span class="n">loss</span><span 
class="o">=</span> <span class="s">'categorical_crossentropy'</span><span 
class="p">)</span>
+
+<span class="n">sysml_model</span> <span class="o">=</span> <span 
class="n">Keras2DML</span><span class="p">(</span><span 
class="n">spark</span><span class="p">,</span><span 
class="n">keras_model</span><span class="p">,</span><span 
class="n">input_shape</span><span class="o">=</span><span 
class="p">(</span><span class="mi">3</span><span class="p">,</span><span 
class="mi">224</span><span class="p">,</span><span class="mi">224</span><span 
class="p">),</span> <span class="n">weights</span><span class="o">=</span><span 
class="s">'weights_dir'</span><span class="p">,</span> <span 
class="n">labels</span><span class="o">=</span><span 
class="s">'https://raw.githubusercontent.com/apache/systemml/master/scripts/nn/examples/caffe2dml/models/imagenet/labels.txt'</span><span
 class="p">)</span>
+<span class="n">sysml_model</span><span class="o">.</span><span 
class="n">summary</span><span class="p">()</span>
+<span class="n">urllib</span><span class="o">.</span><span 
class="n">urlretrieve</span><span class="p">(</span><span 
class="s">'https://upload.wikimedia.org/wikipedia/commons/f/f4/Cougar_sitting.jpg'</span><span
 class="p">,</span> <span class="s">'test.jpg'</span><span class="p">)</span>
+<span class="n">img_shape</span> <span class="o">=</span> <span 
class="p">(</span><span class="mi">3</span><span class="p">,</span> <span 
class="mi">224</span><span class="p">,</span> <span class="mi">224</span><span 
class="p">)</span>
+<span class="n">input_image</span> <span class="o">=</span> <span 
class="n">sml</span><span class="o">.</span><span 
class="n">convertImageToNumPyArr</span><span class="p">(</span><span 
class="n">Image</span><span class="o">.</span><span class="nb">open</span><span 
class="p">(</span><span class="s">'test.jpg'</span><span class="p">),</span> 
<span class="n">img_shape</span><span class="o">=</span><span 
class="n">img_shape</span><span class="p">)</span>
+<span class="n">sysml_model</span><span class="o">.</span><span 
class="n">predict</span><span class="p">(</span><span 
class="n">input_image</span><span class="p">)</span></code></pre></div>
+
+  </div>
+
+</div>
+
+
+        </div> <!-- /container -->
+
+        
+
+        <script src="js/vendor/jquery-1.12.0.min.js"></script>
+        <script src="js/vendor/bootstrap.min.js"></script>
+        <script src="js/vendor/anchor.min.js"></script>
+        <script src="js/main.js"></script>
+        
+
+
+
+
+        <!-- Analytics -->
+        <script>
+            
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+            
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+            
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+            ga('create', 'UA-71553733-1', 'auto');
+            ga('send', 'pageview');
+        </script>
+
+
+
+        <!-- MathJax Section -->
+        <script type="text/x-mathjax-config">
+            MathJax.Hub.Config({
+                TeX: { equationNumbers: { autoNumber: "AMS" } }
+            });
+        </script>
+        <script>
+            // Note that we load MathJax this way to work with local file 
(file://), HTTP and HTTPS.
+            // We could use "//cdn.mathjax...", but that won't support 
"file://".
+            (function(d, script) {
+                script = d.createElement('script');
+                script.type = 'text/javascript';
+                script.async = true;
+                script.onload = function(){
+                    MathJax.Hub.Config({
+                        tex2jax: {
+                            inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ],
+                            displayMath: [ ["$$","$$"], ["\\[", "\\]"] ],
+                            processEscapes: true,
+                            skipTags: ['script', 'noscript', 'style', 
'textarea', 'pre']
+                        }
+                    });
+                };
+                script.src = ('https:' == document.location.protocol ? 
'https://' : 'http://') +
+                    
'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
+                d.getElementsByTagName('head')[0].appendChild(script);
+            }(document));
+        </script>
+    </body>
+</html>


Reply via email to