Databases with numpy
I have several large numpy arrays I'd like to use for training, but they don't all fit in main memory. I know I can use NDArrayIter if I have the arrays in main memory, but I'd like to store and read them from disk. How can I store/read them using mxnet? These are not images.
I'm working on that feature now. in the mean time, you can try ndarrayiter with this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.memmap.html I've never tried this, but it should work. just remember to turn off shuffling.
Actually I think this solution is good enough. Please let me know if it works.
Stay tuned. Will contribute a PR soon
@winstywang does this issue be fixed?
@piiswrong NDArrayIter doesn't work on numpy memory maps with more than 65535 number of arrays. I have a (75000, 4, 128, 128) nd-array and when I used NDArrayIter, it said TypeError: Invalid type '<class 'numpy.core.memmap.memmap'>' for data.
@yl2612 I come across the same error as you for the TypeError, Did you solve it or not?
@yangshao i wrote my own iterator instead
hi,can you share it? thanks a lot!
On May 10, 2017 6:42 PM, "yl2612" [email protected] wrote:
@yangshao https://github.com/yangshao i wrote my own iterator instead
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dmlc/mxnet/issues/791#issuecomment-300633285, or mute the thread https://github.com/notifications/unsubscribe-auth/AIBBivuzx2lUI6t8FsjOoMkCaKGCBvppks5r4j1dgaJpZM4GtmLX .
@yl2612 @yangshao did you solve this? if yes, could you please share code?