A crafted .keras file (~1.2 KB) triggers 4.75 GB allocation via load_model().
H5 dataset shapes bypass is_memory_sufficient() check.
1pip install keras tensorflow h5py
2python3 keras_oom_poc.py
ValueError: Unable to allocate 4.00 GiB for array with shape (300000, 3579)
OR: Process killed by OOM killer
saving_lib.py:1176 — np.array(value) trusts H5 dataset shape.
is_memory_sufficient() checks MODEL shapes, not H5 shapes.