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

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.

主站蜘蛛池模板: 安龙县| 新野县| 武鸣县| 灵宝市| 朝阳区| 平舆县| 卓尼县| 泰州市| 乐山市| 巴塘县| 和龙市| 精河县| 进贤县| 泗水县| 新津县| 基隆市| 西平县| 沙田区| 越西县| 苗栗市| 嘉定区| 太和县| 上林县| 湖北省| 泸溪县| 年辖:市辖区| 扬中市| 甘南县| 商水县| 天等县| 中方县| 华阴市| 正宁县| 佛学| 崇州市| 安西县| 武城县| 翼城县| 宣武区| 五家渠市| 蒙阴县|