- 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
推薦閱讀
- Python程序設計教程(第2版)
- 流量的秘密:Google Analytics網站分析與優化技巧(第2版)
- 潮流:UI設計必修課
- Rust實戰
- 跟老齊學Python:輕松入門
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優化計算
- Spring Cloud、Nginx高并發核心編程
- Learning ArcGIS Pro
- Java深入解析:透析Java本質的36個話題
- Instant QlikView 11 Application Development
- Mastering Predictive Analytics with Python
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Learning Nessus for Penetration Testing
- PHP+MySQL動態網站開發從入門到精通(視頻教學版)
- Python+Office:輕松實現Python辦公自動化