Batch classification of images in Tensorflow java

What's the best way to classify batch of images using TensorFlow java API? I also want the capability to resize the image in GPU so that all the images in the batch are of same dimension.

The only example I have found in the internet is for a single image , here https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/src/main/java/org/tensorflow/examples/LabelImage.java .

In python , I see there is a tf.stack method which allows to create a pack of tensors to create a batch request , I couldnt find anything equivalent to this method in java api.

I found an example of batch request which uses opencv and tensorflow https://medium.com/@alexkn15/tensorflow-and-javacv-591c1b9443a3. Is there a better way to do this using standard tensor operations in java?