table of Contents
2 Create dataset, cat and dog data instance-image enhancement
3 Create model, loss function and optimizer
4 Define a single batch training function
5 Use kaggle to train the model
6 Examples of cat and dog data-image enhancement
7 Further optimization of the model and VGG network
0 Preface:
dog-cat cat and dog data set for custom comprehensive strength and image enhancement
1 Read data
2 Create dataset, cat and dog data instance-image enhancement
3 Create model, loss function and optimizer
Add validation data to custom training, similar to training data
4 Define a single batch training function
5 Use kaggle to train the model
Due to the poor performance of the computer, Kaggle was used for training. Custom training model, in fact, this is very similar to VGG , I will add a demonstration later! ! !
Model training and optimization
6 Examples of cat and dog data-image enhancement
Use five methods
7 Further optimization of the model and VGG network
We draw the image, and the large interval between the two curves shows that there is overfitting
To solve overfitting
- If conditions permit, priority should be given to expanding data --- data enhancement
- Increase the number of models---VGG16VGG19
note:
When there are too many models, the gradient will disappear
Later chapters will proceed
Explanation of VGG model