Horst_G:

change the batch size, to allow processing multiple samples at inference (using a .tflite model). How i


Hi @Horst_G !
I had done something similar using resize_tensor_input  method at .tflite models,  when you can change te input to specific input, like this:
  input_index = interpreter.resize_tensor_input(input_details[0]['index'],[1453,102,1])
  interpreter.allocate_tensors()
  interpreter.set_tensor(input_details[0]['index'], data)
  interpreter.invoke()
  tflite_model_predictions = interpreter.get_tensor(output_details[0]['index'])

In my case i had made this snippet to inference of 1453 samples at once in data array. You can combine this solution using an for loop if you wanna  segmented in more predictions like this:
pred = []
for i in range(27):
  input_index = interpreter.resize_tensor_input(input_details[0]['index'],[1453,102,1])
  interpreter.allocate_tensors()
  interpreter.set_tensor(input_details[0]['index'], split_array[i])
  interpreter.invoke()
  tflite_model_predictions = interpreter.get_tensor(output_details[0]['index'])
  pred.append(tflite_model_predictions)

I hope it’s help you!