Skip to content

Commit ed302bc

Browse files
committed
cosmetic changes
1 parent 96ccd19 commit ed302bc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/io/bioimage/modelrunner/pytorch/PytorchInterface.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ private static String getModelName(String modelSource) throws IOException {
245245
}
246246

247247
@Override
248-
public <T extends RealType<T> & NativeType<T>, R extends RealType<R> & NativeType<R>> List<RandomAccessibleInterval<R>> inference(
249-
List<RandomAccessibleInterval<T>> inputs) throws RunModelException {
248+
public <T extends RealType<T> & NativeType<T>, R extends RealType<R> & NativeType<R>>
249+
List<RandomAccessibleInterval<R>> inference(List<RandomAccessibleInterval<T>> inputs) throws RunModelException {
250250
if (interprocessing) {
251251
return runInterprocessing(inputs);
252252
}
@@ -523,7 +523,8 @@ private void closeShmas() throws RunModelException {
523523
try { shm.close(); } catch (IOException e1) { e1.printStackTrace();}
524524
});
525525
shmaOutputList = null;
526-
closeInterprocess();
526+
if (interprocessing)
527+
closeInterprocess();
527528
}
528529

529530

0 commit comments

Comments
 (0)