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) {
321321 shmaOutputList .add (shm );
322322 }
323323 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 ()));
325325 // TODO remove
326326 double max0 = 0 ;
327327 Cursor <T > iter0 = Views .iterable (rai ).cursor ();
@@ -432,7 +432,16 @@ private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<T
432432 List <String > encodedInputTensors = new ArrayList <String >();
433433 Gson gson = new Gson ();
434434 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 );
436445 SharedMemoryArray shma = SharedMemoryArray .createSHMAFromRAI (tt .getData (), false , true );
437446 shmaInputList .add (shma );
438447 HashMap <String , Object > map = new HashMap <String , Object >();
You can’t perform that action at this time.
0 commit comments