TensorFlow 常用模块

文档中还是有一些小错误的,有的不仔细研究还挺难发现问题的。

使用传统的 tf.Session 这节中:

sess.run (sparse_categorical_accuracy.update (y_true=data_loader.test_label [start_index: end_index], y_pred=y_pred))

应该修改为

sess.run (sparse_categorical_accuracy.update_state (y_true=data_loader.test_label [start_index: end_index], y_pred=y_pred))