Why we use unbatch in Visualize Predictions part?

# place a number here between 0 to 191 to pick an image from the test set
integer_slider = 105

ds = test_dataset.unbatch()
ds = ds.batch(200)
images = []

y_true_segments = []
for image, annotation in ds.take(2):
  y_true_segments = annotation
  images = image

hello, i see in the code when we want to visualize the predictions of the model. Why we unbatch the test dataset and batch it again using batch_size=200 ? and i print the y_true_segments shape is TensorShape([192, 64, 84, 11]). I can’t understand why we do this here. Thanks~

also: why we use batch in processing test dataset ?

I think; the test dataset is batched because by batching data are better processed in general especially when using TF. The second batching is probably to better suit this application.