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

Retrieving training and test data

The MNIST dataset already comprises both training and test data. There are 60,000 data points of training data and 10,000 points of test data. If you do not have the data file locally at the '~/.keras/datasets/' + path, it can be downloaded at this location.

Each MNIST data point has:

  • An image of a handwritten digit
  • A corresponding label that is a number from 0-9 to help identify the image

The images will be called, and will be the input to our neural network, X; their corresponding labels are y.

We want our labels as one-hot vectors. One-hot vectors are vectors of many zeros and one. It's easiest to see this in an example. The number 0 is represented as [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], and 4 is represented as [0, 0, 0, 0, 1, 0, 0, 0, 0, 0] as a one-hot vector.

主站蜘蛛池模板: 达拉特旗| 临江市| 东乌珠穆沁旗| 临汾市| 两当县| 梅州市| 元江| 老河口市| 苍溪县| 临颍县| 扬中市| 高平市| 淄博市| 曲沃县| 黄骅市| 德州市| 吉首市| 呈贡县| 宾阳县| 洱源县| 靖远县| 河间市| 无棣县| 华安县| 滦平县| 湖南省| 广灵县| 无锡市| 昭觉县| 青阳县| 柳林县| 宜都市| 庄河市| 米林县| 高邮市| 南丹县| 沅陵县| 襄樊市| 叶城县| 通海县| 富宁县|