- 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 Node Package Manager
- 零基礎(chǔ)學(xué)C++程序設(shè)計(jì)
- 你不知道的JavaScript(中卷)
- Python:Master the Art of Design Patterns
- 劍指大數(shù)據(jù):企業(yè)級(jí)數(shù)據(jù)倉(cāng)庫(kù)項(xiàng)目實(shí)戰(zhàn)(在線(xiàn)教育版)
- Mastering Akka
- Python計(jì)算機(jī)視覺(jué)與深度學(xué)習(xí)實(shí)戰(zhàn)
- Python機(jī)器學(xué)習(xí)
- C++ Data Structures and Algorithm Design Principles
- Slick2D Game Development
- 邊做邊學(xué)深度強(qiáng)化學(xué)習(xí):PyTorch程序設(shè)計(jì)實(shí)踐
- HTML 5與CSS 3權(quán)威指南(第4版·下冊(cè))
- 機(jī)器學(xué)習(xí)開(kāi)發(fā)者指南
- 深入解析WPF編程
- Developing Windows Store Apps with HTML5 and JavaScript