Skip to content

Commit 84f26d2

Browse files
add comments
1 parent 37db80d commit 84f26d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

keras_hub/src/utils/preset_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,8 @@ def load_task(self, cls, load_weights, load_task_weights, **kwargs):
688688
# We found a `task.json` with a complete config for our class.
689689
# Forward backbone args.
690690
if "config" in self.config and "dtype" in self.config["config"]:
691+
# Forward the serialized dtype from the config. This is critical for
692+
# restoring quantized models, which rely on a `DTypePolicyMap`.
691693
kwargs["dtype"] = self.config["config"]["dtype"]
692694
backbone_kwargs, kwargs = self.get_backbone_kwargs(**kwargs)
693695
if "backbone" in task_config["config"]:

0 commit comments

Comments
 (0)