The exported .h5 model file seems not compatible with higher versions of tensorflow. With tensorflow 2.19.0 + python 3.11, the h5 file won't load properly. However, it works perfectly well with tensorflow 2.12.0 python 3.8.