Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
ND4J: Error in Nd4j.toNpyByteArray(INDArray) format? #7466
Reported in Gitter:
This is the code on the Android side
On the server side, this is what is used
Numpy version is 1.16.2
I will try the snapshot with
I ran into this issue too. Here is some extra info:
Hex dump of files produced by Nd4j:
Hex dump of a different file (3x3 identity matrix) saved in Numpy (not from Java):
Looks like the header is added twice in Nd4j.
OK, some progress, but not a solution yet: https://github.com/deeplearning4j/deeplearning4j/pull/7518/files
Header was definitely incorrectly added in BaseNativeNDArrayFactory.java (see removed magicPointer in PR).
Header and content is ultimately coming from here:
And, the wrong type ("<?4" instead of "<f4") from here:
cnpy.cpp is a 3rd party library. Might be old, outdated, or simply wrong?