From de260bd5bd715f224ab1600a2bad42197f5d2979 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Sat, 23 Nov 2024 14:57:02 +0100 Subject: [PATCH] add print to debug --- .../bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java | 4 ++++ 1 file changed, 4 insertions(+) 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 8165914..6637008 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 @@ -134,6 +134,10 @@ private static void buildFromTensorFloat(Tensor tensor, String memoryName) throw tensor.data_ptr_float().get(flat); floatBuffer.put(flat); byteBuffer.rewind(); + float sum = 0; + for (float ff : flat) + sum += ff; + System.out.println("SUMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: " + sum); shma.getDataBufferNoHeader().put(byteBuffer); if (PlatformDetection.isWindows()) shma.close(); }