@@ -438,10 +438,9 @@ private List<String> encodeOutputs(List<Tensor<?>> outputTensors) throws FileAlr
438
438
shmaOutputList .add (shma );
439
439
map .put (MEM_NAME_KEY , shma .getName ());
440
440
} else if (PlatformDetection .isWindows ()){
441
- String memName = SharedMemoryArray .createShmName ();
442
441
SharedMemoryArray shma = SharedMemoryArray .create (0 );
443
442
shmaOutputList .add (shma );
444
- map .put (MEM_NAME_KEY , memName );
443
+ map .put (MEM_NAME_KEY , shma . getName () );
445
444
} else {
446
445
String memName = SharedMemoryArray .createShmName ();
447
446
map .put (MEM_NAME_KEY , memName );
@@ -573,13 +572,15 @@ private static String padSpecialJavaBin(String javaBin) {
573
572
public static void main (String [] args ) throws LoadModelException , IOException , RunModelException {
574
573
if (args .length == 0 ) {
575
574
576
- String modelFolder = "/home/carlos/git/deep-icy/models/DeepSupervisionUnet_07112023_172430" ;
577
- String modelSourc = modelFolder + "/dsUnet.pt" ;
575
+ String modelFolder = "C:\\ Users\\ carlos\\ OneDrive\\ Documentos\\ pasteur\\ git"
576
+ + "\\ deep-icy\\ models\\ MitchondriaEMSegmentation2D_31102023_214027" ;
577
+ String modelSourc = modelFolder + "\\ weights-torchscript.pt" ;
578
578
PytorchInterface pi = new PytorchInterface ();
579
579
pi .loadModel (modelFolder , modelSourc );
580
- RandomAccessibleInterval <FloatType > rai = ArrayImgs .floats (new long [] {1 , 3 , 1024 , 1024 });
580
+ RandomAccessibleInterval <FloatType > rai = ArrayImgs .floats (new long [] {1 , 1 , 512 , 512 });
581
581
Tensor <?> inp = Tensor .build ("aa" , "bcyx" , rai );
582
- Tensor <?> out = Tensor .buildBlankTensor ("oo" , "bcyx" , new long [] {1 , 9 , 1024 , 1024 }, new FloatType ());
582
+ Tensor <?> out = Tensor .buildBlankTensor ("oo" , "bcyx" , new long [] {1 , 2 , 512 , 512 }, new FloatType ());
583
+ //Tensor<?> out = Tensor.buildEmptyTensor("oo", "bcyx");
583
584
List <Tensor <?>> ins = new ArrayList <Tensor <?>>();
584
585
List <Tensor <?>> ous = new ArrayList <Tensor <?>>();
585
586
ins .add (inp );
0 commit comments