We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d170837 commit 68eba2eCopy full SHA for 68eba2e
src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/TensorBuilder.java
@@ -135,7 +135,7 @@ private static org.bytedeco.pytorch.Tensor buildFloat(SharedMemoryArray shmArray
135
+ " is too big. Max number of elements per ubyte tensor supported: " + Integer.MAX_VALUE);
136
if (!shmArray.isNumpyFormat())
137
throw new IllegalArgumentException("Shared memory arrays must be saved in numpy format.");
138
- ByteBuffer buff = shmArray.getDataBufferNoHeader().order(ByteOrder.LITTLE_ENDIAN);
+ ByteBuffer buff = shmArray.getDataBufferNoHeader().order(ByteOrder.BIG_ENDIAN);
139
float[] flat = new float[buff.capacity() / 4];
140
buff.asFloatBuffer().get(flat);
141
Tensor ndarray = Tensor.create(flat, ogShape);
0 commit comments