Skip to content

Commit 95a96f5

Browse files
committed
remove unnnecesary code
1 parent 80bfa36 commit 95a96f5

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/main/java/io/bioimage/modelrunner/tensorflow/v1/Tensorflow1Interface.java

+2-11
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ protected void runFromShmas(List<String> inputs, List<String> outputs) throws IO
367367
void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTensors) throws RunModelException {
368368
shmaInputList = new ArrayList<SharedMemoryArray>();
369369
shmaOutputList = new ArrayList<SharedMemoryArray>();
370-
List<String> encIns = modifyForWinCmd(encodeInputs(inputTensors));
371-
List<String> encOuts = modifyForWinCmd(encodeOutputs(outputTensors));
370+
List<String> encIns = encodeInputs(inputTensors);
371+
List<String> encOuts = encodeOutputs(outputTensors);
372372
LinkedHashMap<String, Object> args = new LinkedHashMap<String, Object>();
373373
args.put("inputs", encIns);
374374
args.put("outputs", encOuts);
@@ -416,15 +416,6 @@ private void closeShmas() {
416416
shmaOutputList = null;
417417
}
418418

419-
private static List<String> modifyForWinCmd(List<String> ins){
420-
if (!PlatformDetection.isWindows())
421-
return ins;
422-
List<String> newIns = new ArrayList<String>();
423-
for (String ii : ins)
424-
newIns.add("\"" + ii.replace("\"", "\\\"") + "\"");
425-
return newIns;
426-
}
427-
428419

429420
private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<Tensor<T>> inputTensors) {
430421
List<String> encodedInputTensors = new ArrayList<String>();

0 commit comments

Comments
 (0)