- Neural Networks with Keras Cookbook
- V Kishore Ayyadevara
- 172字
- 2021-07-02 12:46:26
How it works...
The key steps that we have performed in the preceding code are as follows:
- We flattened the input dataset so that each pixel is considered a variable using the reshape method
- Additionally, we scaled the dataset so that each variable now has a value between zero and one
- We achieved the preceding by dividing the values of a variable with the maximum value of that variable
- We performed one-hot encoding on the output values so that we can distinguish between different labels using the to_categorical method in the np_utils package
- We built a neural network with a hidden layer using the sequential addition of layers
- We compiled the neural network to minimize categorical cross entropy loss (as the output has 10 different categories) using the model.compile method
- We fitted the model with training data using the model.fit method
- We extracted the training and test losses accuracies across all the epochs that were stored in the history
- We also identified a scenario that we consider overfitting
推薦閱讀
- INSTANT Mock Testing with PowerMock
- Practical Data Analysis Cookbook
- Python入門很簡單
- 程序員面試算法寶典
- Web全棧工程師的自我修養
- ANSYS Fluent 二次開發指南
- 劍指Java:核心原理與應用實踐
- ArcGIS for Desktop Cookbook
- Delphi開發典型模塊大全(修訂版)
- INSTANT Apache ServiceMix How-to
- The Statistics and Calculus with Python Workshop
- Python全棧開發:基礎入門
- Deep Learning for Natural Language Processing
- Java程序設計實用教程(第2版)
- Beginning C# 7 Hands-On:The Core Language