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

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.

主站蜘蛛池模板: 大余县| 油尖旺区| 大港区| 山东省| 都江堰市| 丹寨县| 雷波县| 西贡区| 临夏县| 博湖县| 山阳县| 阳东县| 鹤壁市| 永新县| 修文县| 定远县| 桃园县| 澄江县| 栾川县| 武川县| 田林县| 定兴县| 灵山县| 油尖旺区| 孟津县| 开远市| 盘山县| 饶平县| 曲靖市| 连州市| 剑阁县| 新疆| 辽宁省| 武功县| 三都| 望都县| 新竹县| 阿合奇县| 涞水县| 武清区| 图们市|