构建深度卷积神经网络,利用所下载的人脸数据集和深度卷积网络,完成人脸识别任务。(python代码实现的结果)
时间: 2024-03-25 20:41:47 浏览: 65
由于我没有实际运行这段代码,因此下面的结果只是一个假设的输出。
```python
Epoch 1/10
326/326 [==============================] - 69s 211ms/step - loss: 0.4267 - accuracy: 0.8064 - val_loss: 0.2971 - val_accuracy: 0.8712
Epoch 2/10
326/326 [==============================] - 68s 208ms/step - loss: 0.1965 - accuracy: 0.9218 - val_loss: 0.1849 - val_accuracy: 0.9288
Epoch 3/10
326/326 [==============================] - 68s 208ms/step - loss: 0.1159 - accuracy: 0.9589 - val_loss: 0.1775 - val_accuracy: 0.9375
Epoch 4/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0646 - accuracy: 0.9787 - val_loss: 0.2226 - val_accuracy: 0.9345
Epoch 5/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0366 - accuracy: 0.9884 - val_loss: 0.2227 - val_accuracy: 0.9375
Epoch 6/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0208 - accuracy: 0.9944 - val_loss: 0.2543 - val_accuracy: 0.9423
Epoch 7/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0121 - accuracy: 0.9972 - val_loss: 0.2851 - val_accuracy: 0.9404
Epoch 8/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0059 - accuracy: 0.9992 - val_loss: 0.3321 - val_accuracy: 0.9433
Epoch 9/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0035 - accuracy: 0.9997 - val_loss: 0.3900 - val_accuracy: 0.9365
Epoch 10/10
326/326 [==============================] - 68s 208ms/step - loss: 0.0031 - accuracy: 0.9994 - val_loss: 0.4503 - val_accuracy: 0.9317
Accuracy: 0.93
```
从输出结果中可以看出,该模型在测试集上的准确率约为 93%。但需要注意的是,这个结果只是一个假设的输出,实际效果可能会有所不同。
阅读全文