'No dependencies have been added to tensorflow.python.keras.engine.functional.Functional object

I was trying to load the checkpoints weights to the trained model and got the following error message. Any idea how to solve it?

File "/src/trainer/loaders.py", line 439, in _find_weights
    model.load_weights(best_candidate)
  File "/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2308, in load_weights
    status.assert_nontrivial_match()
  File "/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 830, in assert_nontrivial_match
    raise AssertionError(
AssertionError: Nothing to load. No dependencies have been added to <tensorflow.python.keras.engine.functional.Functional object at 0x7ff2bc073e20> yet.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source