keras/src/utils/torch_utils.py/TorchModuleWrapper/from_config
class TorchModuleWrapper:    def from_config(cls, config):
        import torch

        if "module" in config:
            buffer = io.BytesIO(config["module"])
            config["module"] = torch.load(buffer)
        return cls(**config)