How to create a file like the MNIST dataset

半城伤御伤魂 提交于 2019-12-04 23:00:01

问题


So i have a bunch of images (PNG) and their names can be used as labels. Is there a tool or an example on how i can take those images and create a dataset like the MNIST IDX one.

There are a lot of examples on how to read them but no examples on how to create them.

Any help would be greatly appreciated!


回答1:


This can help.

The -images- files were written using the function save-idx3-ubyte and the -labels- files with the function save-idx1-ubyte. The functions in questions are defined in lush/lsh/libidx/idx-io.lsh The file format is described in the section "IDX file format for compilable I/O" which is under "standard libraries" -> "Tensor/Matrix/Scalar/Vector libraries" -> "IDX reading and writing".

The 32-bit ints in the header of the files may be byte-swapped.

-- Yann

http://sourceforge.net/p/lush/mailman/message/28879896/



来源:https://stackoverflow.com/questions/26898682/how-to-create-a-file-like-the-mnist-dataset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!