From 9c9802b241343d9bd32381a29e343af89d6f5747 Mon Sep 17 00:00:00 2001
From: carlosuc3m <100329787@alumnos.uc3m.es>
Date: Thu, 13 Jun 2024 18:57:10 +0200
Subject: [PATCH] update to new JDLL version
---
pom.xml | 7 ++++++-
.../pytorch/javacpp/PytorchJavaCPPInterface.java | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index eaae030..21b1f96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,7 +126,7 @@
sign,deploy-to-scijava
2.0.1-1.5.9
- 0.5.6
+ 0.5.8
11.8-8.6-1.5.8
2023.1-1.5.9
@@ -150,6 +150,11 @@
pytorch-platform
${pytorch-javacpp.version}
+
+ org.bytedeco
+ pytorch
+ ${pytorch-javacpp.version}
+
org.bytedeco
diff --git a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java
index 032e434..fa046b4 100644
--- a/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java
+++ b/src/main/java/io/bioimage/modelrunner/pytorch/javacpp/PytorchJavaCPPInterface.java
@@ -410,7 +410,7 @@ private List encodeInputs(List> inputTensors) throws FileAlrea
HashMap map = new HashMap();
map.put(NAME_KEY, tt.getName());
map.put(SHAPE_KEY, tt.getShape());
- map.put(DTYPE_KEY, CommonUtils.getDataType(tt.getData()));
+ map.put(DTYPE_KEY, CommonUtils.getDataTypeFromRAI(tt.getData()));
map.put(IS_INPUT_KEY, true);
map.put(MEM_NAME_KEY, shma.getName());
encodedInputTensors.add(gson.toJson(map));
@@ -428,7 +428,7 @@ private List encodeOutputs(List> outputTensors) throws FileAlr
map.put(IS_INPUT_KEY, false);
if (!tt.isEmpty()) {
map.put(SHAPE_KEY, tt.getShape());
- map.put(DTYPE_KEY, CommonUtils.getDataType(tt.getData()));
+ map.put(DTYPE_KEY, CommonUtils.getDataTypeFromRAI(tt.getData()));
SharedMemoryArray shma = SharedMemoryArray.createSHMAFromRAI(tt.getData(), false, true);
shmaOutputList.add(shma);
map.put(MEM_NAME_KEY, shma.getName());