Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.69 KB

tensorflow-local.md

File metadata and controls

52 lines (33 loc) · 1.69 KB

Train a TensorFlow model locally

In this quickstart, we will run a TensorFlow model with the MNIST dataset locally in AI Tools. The MNIST database has a training set of 60,000 examples, and a test set of 10,000 examples of handwritten digits.

Prerequisites

Before you begin, ensure you have the following installed:

Google TensorFlow

Run the following command in a terminal.

pip install tensorflow

or if you have an Nvidia GPU

pip install tensorflow-gpu

NumPy and SciPy

run the following command in a terminal:

pip install numpy scipy

Download sample code

Download this GitHub repository containing samples for getting started with deep learning across TensorFlow, CNTK, Theano and more.

Open a project and train model

  • Launch Visual Studio Code and select File > Open Folder (Ctrl+K Ctrl+Of)

  • Select the examples\tensorflow\MNIST subfolder from your local samples repository.

    Project Folder

  • Open convolutional.py and press F5 to start.

    The output will be printed in the terminal window.

    Sample output from console

Tip

Make sure you've selected correct python environment which has necessary packages (tensorFlow, NumPy, SciPy, etc.) installed.
Use command Python: Select Interpreer to select proper Python interpreter. Refers to Setting Up Python Interpreter for detailed information.

See Also