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

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.

主站蜘蛛池模板: 阿克陶县| 广汉市| 乌海市| 马边| 泗洪县| 水城县| 和硕县| 灌南县| 织金县| 白山市| 临海市| 宜宾县| 习水县| 渭南市| 习水县| 独山县| 碌曲县| 天水市| 南皮县| 罗甸县| 金昌市| 吴旗县| 阆中市| 湄潭县| 罗田县| 洪湖市| 宁德市| 上虞市| 外汇| 荣昌县| 天台县| 乌恰县| 常宁市| 屯留县| 吉水县| 舒兰市| 华宁县| 平和县| 酒泉市| 海林市| 犍为县|