File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/main/java/io/bioimage/modelrunner/pytorch/javacpp Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ else if (task.status == TaskStatus.CRASHED) {
321
321
shmaOutputList .add (shm );
322
322
}
323
323
RandomAccessibleInterval <T > rai = shm .getSharedRAI ();
324
- System .out .println ("Output size: " + Arrays .asList (rai .dimensionsAsLongArray ()));
324
+ System .out .println ("Output size: " + Arrays .toString (rai .dimensionsAsLongArray ()));
325
325
// TODO remove
326
326
double max0 = 0 ;
327
327
Cursor <T > iter0 = Views .iterable (rai ).cursor ();
@@ -432,7 +432,16 @@ private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<T
432
432
List <String > encodedInputTensors = new ArrayList <String >();
433
433
Gson gson = new Gson ();
434
434
for (Tensor <T > tt : inputTensors ) {
435
- System .out .println ("Input size: " + Arrays .asList (tt .getData ().dimensionsAsLongArray ()));
435
+ System .out .println ("Input size: " + Arrays .toString (tt .getData ().dimensionsAsLongArray ()));
436
+ double max0 = 0 ;
437
+ Cursor <T > iter0 = Views .iterable (tt .getData ()).cursor ();
438
+ while (iter0 .hasNext ()) {
439
+ iter0 .next ();
440
+ double doub = iter0 .get ().getRealDouble ();
441
+ if (doub > max0 )
442
+ max0 = doub ;
443
+ }
444
+ System .out .println ("Input max: " + max0 );
436
445
SharedMemoryArray shma = SharedMemoryArray .createSHMAFromRAI (tt .getData (), false , true );
437
446
shmaInputList .add (shma );
438
447
HashMap <String , Object > map = new HashMap <String , Object >();
You can’t perform that action at this time.
0 commit comments