---
layout: global
title: Deep Learning with SystemML
description: Deep Learning with SystemML
---
* This will become a table of contents (this text will be scraped).
{:toc}
# Introduction
There are three different ways to implement a Deep Learning model in SystemML:
1. Using the [DML-bodied NN library](https://github.com/apache/systemml/tree/master/scripts/nn): This library allows the user to exploit full flexibility of [DML language](http://apache.github.io/systemml/dml-language-reference) to implement your neural network.
2. Using the experimental [Caffe2DML API](http://apache.github.io/systemml/beginners-guide-caffe2dml.html): This API allows a model expressed in Caffe's proto format to be imported into SystemML. This API **doesnot** require Caffe to be installed on your SystemML.
3. Using the experimental [Keras2DML API](http://apache.github.io/systemml/beginners-guide-keras2dml.html): This API allows a model expressed in Keras's API to be imported into SystemML. However, this API requires Keras to be installed on your driver.
| | NN library | Caffe2DML | Keras2DML |
|------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| External dependency | None | None | Keras |
| Ability to add custom layers | Yes | No | No |
| The user needs to know | [DML](http://apache.github.io/systemml/dml-language-reference) | [Caffe's proto API](http://apache.github.io/systemml/reference-guide-caffe2dml#layers-supported-in-caffe2dml) | [Keras' API](https://keras.io/models/about-keras-models/) |
| Can be invoked using pyspark | Yes. Please see [Python MLContext API](http://apache.github.io/systemml/spark-mlcontext-programming-guide) | Yes. | Yes. |
| Can be invoked using spark-shell | Yes. Please see [Scala MLContext API](http://apache.github.io/systemml/spark-mlcontext-programming-guide) | Limited support | No |
| Can be invoked via command-line or JMLC API | Yes | No | No |
| GPU and [native BLAS](http://apache.github.io/systemml/native-backend.html) support | Yes | Yes | Yes |
| Part of SystemML's [mllearn](http://apache.github.io/systemml/python-reference.html#mllearn-api) API | No | Yes | Yes |
## mllearn API
Before we go any further, let us briefly discuss the training and prediction functions in the mllearn API (i.e. Caffe2DML and Keras2DML).
### Training functions