“Error: Mixing Different tf.distribute.Strategy Objects when Evaluating with runner.infer on GPU”

I’m using runner.infer in Hailo to perform evaluation. Since I have a large evaluation dataset, I’m generating mini-batches and calling the function multiple times. Everything works fine when using the CPU, but when I use the GPU, I encounter the following error:

RuntimeError: Mixing different tf.distribute.Strategy objects: <tensorflow.python.distribute.mirrored_strategy.MirroredStrategy object at 0x7f3378555840> is not <tensorflow.python.distribute.mirrored_strategy.MirroredStrategy object at 0x7f3218e8e2f0>
Inference: 0entries [00:00, ?entries/s]

Is there any way to perform evaluation on the GPU and call runner.infer multiple times without encountering this error?