1.For New TFLite Beginner
一、 Getting Started for ML Beginners
This document explains how to use machine learning to classify (categorize) Iris flowers by species. This document dives deeply into the TensorFlow code to do exactly that, explaining ML fundamentals along the way.
If the following list describes you, then you are in the right place:
You know little to nothing about machine learning.
You want to learn how to write TensorFlow programs.
You can code (at least a little) in Python.
Fortunately, someone has already created [a data set of 120 Iris
flowers]( https://en.wikipedia.org/wiki/Iris_flower_data_set)
with the sepal and petal measurements. This data set has become
one of the canonical introductions to machine learning classification problems.
(The [MNIST database]( https://en.wikipedia.org/wiki/MNIST_database),
which contains handwritten digits, is another popular classification
problem.) The first 5 entries of the Iris data set
look as follows:
| Sepal length | sepal width | petal length | petal width | species
| --- | --- | --- | --- | ---
|6.4 | 2.8 | 5.6 | 2.2 | 2
|5.0 | 2.3 | 3.3 | 1.0 | 1
|4.9 | 2.5 | 4.5 | 1.7 | 2
|4.9 | 3.1 | 1.5 | 0.1 | 0
|5.7 | 3.8 | 1.7 | 0.3 | 0
Let's introduce some terms:
* The last column (species) is called the
[**label**]( https://developers.google.com/machine-learning/glossary/#label);
the first four columns are called
[**features**]( https://developers.google.com/machine-learning/glossary/#feature).
Features are characteristics of an example, while the label is
the thing we're trying to predict.
* An [**example**]( https://developers.google.com/machine-learning/glossary/#example)
consists of the set of features and the label for one sample
flower. The preceding table shows 5 examples from a data set of
120 examples.
Each label is naturally a string (for example, "setosa"), but machine learning
typically relies on numeric values. Therefore, someone mapped each string to
a number. Here's the representation scheme:
* 0 represents setosa
* 1 represents versicolor
* 2 represents virginica
二、 Models and training
A **model** is the relationship between features
and the label. For the Iris problem, the model defines the relationship
between the sepal and petal measurements and the predicted Iris species. Some
simple models can be described with a few lines of algebra, but complex machine
learning models have a large number of parameters that are difficult to
summarize.
Could you determine the relationship between the four features and the
Iris species *without* using machine learning? That is, could you use
traditional programming techniques (for example, a lot of conditional
statements) to create a model? Maybe. You could play with the data set
long enough to determine the right relationships of petal and sepal
measurements to particular species. However, a good machine learning
approach *determines the model for you*. That is, if you feed enough
representative examples into the right machine learning model type, the program
will determine the relationship between sepals, petals, and species.
**Training** is the stage of machine learning in which the model is
gradually optimized (learned). The Iris problem is an example
of [**supervised machine
learning**]( https://developers.google.com/machine-learning/glossary/#supervised_machine_learning)
in which a model is trained from examples that contain labels. (In
[**unsupervised machine
learning**]( https://developers.google.com/machine-learning/glossary/#unsupervised_machine_learning),
the examples don't contain labels. Instead, the model typically finds
patterns among the features.)
三、Get the sample program
1. Install TensorFlow
An example of [ Installing TensorFlow on Windows]
1.Windows requirements:
* 64-bit, x86 desktops or laptops
* Windows 7 or later
2.Install TensorFlow with CPU support only
- Install Python 3.6.x
* [Python 3.6.x 64-bit from python.org]( Python Release Python 3.6.2 | Python.org)
- Update pip
python -m pip install --upgrad pip

- Install TensorFlow


2. Activate your TensorFlow environment

3. Install or upgrade pandas by issuing the following
command:pip install pandas

4.get sample program;
Clone the TensorFlow Models
git clone https://github.com/tensorflow/models
