From e6f5bd53755bbb123a5b3740bec53729b31b35e0 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Sat, 23 Nov 2024 14:26:56 +0100 Subject: [PATCH] soy tontoooooooooooo --- .../io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java index 0a1b16b..c31281c 100644 --- a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java +++ b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java @@ -117,7 +117,7 @@ private static void buildFromTensorFloat(Tensor tensor, String memoryName) throw ByteBuffer byteBuffer = ByteBuffer.allocateDirect((int) (flatSize * Float.BYTES)); FloatBuffer floatBuffer = byteBuffer.asFloatBuffer(); tensor.data_ptr_float().get(flat); - floatBuffer.put(flatSize); + floatBuffer.put(flat); byteBuffer.rewind(); shma.getDataBufferNoHeader().put(byteBuffer); if (PlatformDetection.isWindows()) shma.close();