You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/service/how-to-train-keras.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Train and register Keras models running on TensorFlow
2
+
title: Train and register a Keras classification using Azure Machine Learning service.
3
3
titleSuffix: Azure Machine Learning service
4
-
description: This article shows you how to train and register a Keras model running on TensorFlow using Azure Machine Learning service.
4
+
description: This article shows you how to train and register a Keras classification model running on TensorFlow using Azure Machine Learning service.
5
5
services: machine-learning
6
6
ms.service: machine-learning
7
7
ms.subservice: core
@@ -13,29 +13,31 @@ ms.date: 06/07/2019
13
13
ms.custom: seodec18
14
14
---
15
15
16
-
# Train and register Keras models at scale with Azure Machine Learning service
16
+
# Train and register a Keras classification model with Azure Machine Learning service
17
17
18
-
This article shows you how to train and register a Keras model built on TensorFlow using Azure Machine Learning service. It uses the popular [MNIST dataset](http://yann.lecun.com/exdb/mnist/) to classify handwritten digits using a deep neural network (DNN) built using the [Keras Python library](https://keras.io) running on top of [TensorFlow](https://www.tensorflow.org/overview).
18
+
This article shows you how to train and register a Keras classification model built on TensorFlow using Azure Machine Learning service. It uses the popular [MNIST dataset](http://yann.lecun.com/exdb/mnist/) to classify handwritten digits using a deep neural network (DNN) built using the [Keras Python library](https://keras.io) running on top of [TensorFlow](https://www.tensorflow.org/overview).
19
19
20
20
Keras is a high-level neural network API capable of running top of other popular DNN frameworks to simplify development. With Azure Machine Learning service, you can rapidly scale out training jobs using elastic cloud compute resources. You can also track your training runs, version models, deploy models, and much more.
21
21
22
22
Whether you're developing a Keras model from the ground-up or you're bringing an existing model into the cloud, Azure Machine Learning service can help you build production-ready models.
23
23
24
+
See the [conceptual article](concept-deep-learning-vs-machine-learning.md) for information on the differences between machine learning and deep learning.
25
+
24
26
## Prerequisites
25
27
26
28
Run this code on either of these environments:
27
29
28
30
- Azure Machine Learning Notebook VM - no downloads or installation necessary
29
31
30
32
- Complete the [cloud-based notebook quickstart](quickstart-run-cloud-notebook.md) to create a dedicated notebook server pre-loaded with the SDK and the sample repository.
31
-
- In the samples folder on the notebook server, find a completed and expanded notebook by navigating to this directory: **how-to-use-azureml > training-with-deep-learning > train-hyperparameter-tune-deploy-with-keras** folder.
32
-
33
+
- In the samples folder on the notebook server, find a completed and expanded notebook by navigating to this directory: **how-to-use-azureml > training-with-deep-learning > train-hyperparameter-tune-deploy-with-keras** folder.
34
+
33
35
- Your own Jupyter Notebook server
34
36
35
37
-[Install the Azure Machine Learning SDK for Python](setup-create-workspace.md#sdk)
36
38
-[Create a workspace configuration file](setup-create-workspace.md#write-a-configuration-file)
37
39
-[Download the sample script files](https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras)`mnist-keras.py` and `utils.py`
38
-
40
+
39
41
You can also find a completed [Jupyter Notebook version](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb) of this guide on the GitHub samples page. The notebook includes expanded sections covering intelligent hyperparameter tuning, model deployment, and notebook widgets.
@@ -135,7 +137,7 @@ For more information on compute targets, see the [what is a compute target](conc
135
137
136
138
The [TensorFlow estimator](https://docs.microsoft.com/python/api/azureml-train-core/azureml.train.dnn.tensorflow?view=azure-ml-py) provides a simple way of launching TensorFlow training jobs on compute target. Since Keras runs on top of TensorFlow, you can use the TensorFlow estimator andimport the Keras library using the `pip_packages` argument.
137
139
138
-
The TensorFlow estimator is implemented through the generic [`estimator`](https://docs.microsoft.com//python/api/azureml-train-core/azureml.train.estimator.estimator?view=azure-ml-py) class, which can be used to support any framework. For more information about training models using the generic estimator, see [train models with Azure Machine Learning using estimator](how-to-train-ml-models.md)
140
+
The TensorFlow estimator is implemented through the generic [`estimator`](https://docs.microsoft.com//python/api/azureml-train-core/azureml.train.estimator.estimator?view=azure-ml-py) class, which can be used to support any framework. Additionally, create a dictionary `script_params` that contains the DNN hyperparameter settings. For more information about training models using the generic estimator, see [train models with Azure Machine Learning using estimator](how-to-train-ml-models.md)
139
141
140
142
```Python
141
143
script_params = {
@@ -175,7 +177,7 @@ As the Run is executed, it goes through the following stages:
175
177
176
178
## Register the model
177
179
178
-
Once you've trained the model, you can register it to your workspace. Model registration lets you store and version your models in your workspace to simplify [model management and deployment](concept-model-management-and-deployment.md).
180
+
Once you've trained the DNN model, you can register it to your workspace. Model registration lets you store and version your models in your workspace to simplify [model management and deployment](concept-model-management-and-deployment.md).
179
181
180
182
```Python
181
183
model = run.register_model(model_name='keras-dnn-mnist', model_path='outputs/model')
0 commit comments