In this tutorial, we will train a TensorFlow model using the MNIST dataset in an Azure Deep Learning Virtual Machine.
The MNIST database has a training set of 60,000 examples, and a test set of 10,000 examples of handwritten digits.
Before you begin, ensure you have the following installed and configured:
Download this GitHub repository containing samples for getting started with deep learning across TensorFlow, CNTK, Theano and more.
Please read instructions for Setting up Deep Learning Virtual Machine.
Note
Set Location to US West 2 (or others which have Deep Learning VM) and OS type as Linux.
Login to your Deep Learning VM using a tool like Putty or similar. Execute below to modify your bashrc file to enable remote deep learning job submission (configures remote behavior to work just like if you logged into the VM).
echo -e ". /etc/profile\n$(cat ~/.bashrc)" > ~/.bashrc
-
Launch Visual Studio Code and select File > Open Folder (Ctrl+K Ctrl+Of)
-
Select the examples\tensorflow\MNIST subfolder from your local samples repository.
Right click the Remote Linux node in AI EXPLORER and select Add Configuration. You can also use command AI: Add Platform Configuration in command palette.
A new ai_linux_new_config.json is created and opened in editor window for review. Besides host, port and username, either a password or a private key file is required.
For detailed guide about general submitting steps, please refer to Submitting Jobs
-
Open
convolutional.py
-
Right click the Azure VM Node in AI EXPLORER and select AI: Submit Job
-
Review and make necessary modification in created ai_job_properties.json and then click Finish button to submit the job.
To check the status and detail of the job and download its assets, please use Job View.
Storage Explorer is also a good place to access the job assets.
Stop the VM if you plan on using it in the near future. If you are finished with this tutorial, run the following command to clean up your resources:
az group delete --name myResourceGroup