TensorFlow base (nine) - MNIST dataset combat

A, MNIST training dataset and testing process analysis:

1.1 Data preparation phase

1.1.1 MNIST section and sets the read data of the present data set tensorflow a function:

1.1.2 depth study of commonly used functions:

1.2 Training and testing phase

1.2.1 Saving and loading ckpt model of thinking:

1.2.2 Test training model accuracy ideas

Second, code implementation

2.1 Data set ready

These two join the main function of training, the data set is loaded mnist

input_data.read_sets () is a function for a mnist do tensorflow data set, detect whether the data set is not downloaded, as follows:

There are training and test sets and corresponding label file.

2.2 training phase

2.2.1 before feedback network definition

2.2.2 feedback process

Loss after feedback optimization and other content can refer TensorFlow basis (four, five , six, seven, eight) chapter.

2.3 Validation: seeking the model accuracy

2.4 Test

When training, can be validated at the same time, when the accuracy rate reaches a certain level, it can be tested simultaneously. That these three processes can be a

training:

verification:

test:

Guess you like

Origin blog.csdn.net/qq_37764129/article/details/94652586