Skip to content

Commit a2cbf03

Browse files
committed
remove unnecessary code
1 parent 6825604 commit a2cbf03

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/main/java/io/bioimage/modelrunner/tensorflow/v2/api050/Tensorflow2Interface.java

+2-12
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ protected void runFromShmas(List<String> inputs, List<String> outputs) throws IO
350350
void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTensors) throws RunModelException {
351351
shmaInputList = new ArrayList<SharedMemoryArray>();
352352
shmaOutputList = new ArrayList<SharedMemoryArray>();
353-
List<String> encIns = modifyForWinCmd(encodeInputs(inputTensors));
354-
List<String> encOuts = modifyForWinCmd(encodeOutputs(outputTensors));
353+
List<String> encIns = encodeInputs(inputTensors);
354+
List<String> encOuts = encodeOutputs(outputTensors);
355355
LinkedHashMap<String, Object> args = new LinkedHashMap<String, Object>();
356356
args.put("inputs", encIns);
357357
args.put("outputs", encOuts);
@@ -399,16 +399,6 @@ private void closeShmas() {
399399
shmaOutputList = null;
400400
}
401401

402-
private static List<String> modifyForWinCmd(List<String> ins){
403-
if (!PlatformDetection.isWindows())
404-
return ins;
405-
List<String> newIns = new ArrayList<String>();
406-
for (String ii : ins)
407-
newIns.add("\"" + ii.replace("\"", "\\\"") + "\"");
408-
return newIns;
409-
}
410-
411-
412402
private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<Tensor<T>> inputTensors) {
413403
List<String> encodedInputTensors = new ArrayList<String>();
414404
Gson gson = new Gson();

0 commit comments

Comments
 (0)