Skip to content

Commit

Permalink
more prints
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 19, 2024
1 parent 2099e67 commit f2c3e15
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ else if (task.status == TaskStatus.CRASHED) {
shmaOutputList.add(shm);
}
RandomAccessibleInterval<T> rai = shm.getSharedRAI();
System.out.println("Output size: " + Arrays.asList(rai.dimensionsAsLongArray()));
System.out.println("Output size: " + Arrays.toString(rai.dimensionsAsLongArray()));
// TODO remove
double max0 = 0;
Cursor<T> iter0 = Views.iterable(rai).cursor();
Expand Down Expand Up @@ -432,7 +432,16 @@ private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<T
List<String> encodedInputTensors = new ArrayList<String>();
Gson gson = new Gson();
for (Tensor<T> tt : inputTensors) {
System.out.println("Input size: " + Arrays.asList(tt.getData().dimensionsAsLongArray()));
System.out.println("Input size: " + Arrays.toString(tt.getData().dimensionsAsLongArray()));
double max0 = 0;
Cursor<T> iter0 = Views.iterable(tt.getData()).cursor();
while (iter0.hasNext()) {
iter0.next();
double doub = iter0.get().getRealDouble();
if (doub > max0)
max0 = doub;
}
System.out.println("Input max: " + max0);
SharedMemoryArray shma = SharedMemoryArray.createSHMAFromRAI(tt.getData(), false, true);
shmaInputList.add(shma);
HashMap<String, Object> map = new HashMap<String, Object>();
Expand Down

0 comments on commit f2c3e15

Please sign in to comment.