Skip to content

Commit 7b020ca

Browse files
committed
correct small thing
1 parent 8a5cdf1 commit 7b020ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ private static void buildFromTensorFloat(Tensor tensor, String memoryName) throw
107107
tensor.asByteBuffer().rewind();
108108
float sum = 0;
109109
while (tensor.asByteBuffer().hasRemaining())
110-
sum += tensor.asByteBuffer().getFloat();
110+
sum += tensor.asByteBuffer().get();
111111
float sum2 = 0;
112112
while (shma.getDataBufferNoHeader().hasRemaining())
113-
sum2 += shma.getDataBufferNoHeader().getFloat();
113+
sum2 += shma.getDataBufferNoHeader().get();
114114
System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK SRC " + sum);
115115
System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK TAR " + sum2);
116116
shma.getDataBufferNoHeader().rewind();

0 commit comments

Comments
 (0)