This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const math = require('mathjs'); | |
var fs = require('fs'); | |
//These files are found here: http://yann.lecun.com/exdb/mnist/ | |
var imageFile = fs.readFileSync(".../train-images-idx3-ubyte/train-images.idx3-ubyte"); | |
var labelFile = fs.readFileSync(".../train-labels-idx1-ubyte/train-labels.idx1-ubyte"); | |
var pixelValues = []; | |
for (var image = 0; image <= 6000; image++) { |