官术网_书友最值得收藏!

Running a simple Keras net and establishing a baseline

So let's see what will happen when we run the code in the following screenshot:

First, the net architecture is dumped, and we can see the different types of layers used, their output shape, how many parameters they need to optimize, and how they are connected. Then, the network is trained on 48,000 samples, and 12,000 are reserved for validation. Once the neural model is built, it is then tested on 10,000 samples. As you can see, Keras is internally using TensorFlow as a backend system for computation. For now, we don't go into the internals on how the training happens, but we can notice that the program runs for 200 iterations, and each time, the accuracy improves. When the training ends, we test our model on the test set and achieve about 92.36% accuracy on training, 92.27% on validation, and 92.22% on the test.

This means that a bit less than one handwritten character out of ten is not correctly recognized. We can certainly do better than that. In the following screenshot, we can see the test accuracy:

主站蜘蛛池模板: 金堂县| 梁河县| 临夏县| 杨浦区| 乌海市| 昌吉市| 麟游县| 仁寿县| 巢湖市| 洛南县| 京山县| 霍州市| 乌兰察布市| 兰坪| 渭源县| 横峰县| 伊宁县| 宿州市| 浙江省| 临城县| 阿鲁科尔沁旗| 成安县| 蒙山县| 阿合奇县| 贺州市| 广安市| 宝丰县| 桐乡市| 禹州市| 扎囊县| 尼勒克县| 内江市| 宝应县| 井冈山市| 新巴尔虎右旗| 西乌珠穆沁旗| 鸡东县| 万全县| 乌苏市| 井研县| 高阳县|