Note that the checks performed when calling load_state_dict() withstrict=True are affected by modifications the hook makes tomissing_keys or unexpected_keys, as expected. Additions to eitherset of keys will result in an error being thrown when strict=True, andclearing out both missing and unexpected keys will avoid an error.