Skip to content

Converts idx files into Javascript objects. Can be used to import the MNIST dataset files directly from javascript.

License

Notifications You must be signed in to change notification settings

saantonandre/idxToJavascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idxToJavascript

Converts idx files into JS objects

The IDX file format is a simple format for vectors and multidimensional matrices of various numerical types.


I'm working on a neural network in vanilla JS, and haven't found many resources in regards of translating the IDX files into javascript.
Because of this I have made my own implementation, following the instructions as described in the MNIST database website and the MDN documentation about ArrayBuffers and TypedArrays.

Usage:

Import the convertIdx function from the idxConverter.js file.

convertIdx(fileURL).then(result => { myDataSet = result.dataSet })

Mind that the convertIdx function returns a promise (it needs to wait for the XMLHttpRequest to resolve), so you have to work around that. A better description/example of the usage can be found in the main.js file.

About

Converts idx files into Javascript objects. Can be used to import the MNIST dataset files directly from javascript.

Topics

Resources

License

Stars

Watchers

Forks