INNER CODE UNIT · Python
estimate_ranges
google/fully-homomorphic-encryption · demos/cc_fraud/cleartext/estimate_ranges.py:23
def estimate_ranges(
model_path: str,
feature_cols_path: str,
data_path: str,
) -> None:
"""Runs evaluation and estimates activation ranges."""
resolved_model_path = resolve_path(model_path)
if not os.path.exists(resolved_model_path):
raise FileNotFoundError(
f"Model file not found at {model_path} (resolved:"
f" {resolved_model_path})"
)
print(f"Loading checkpoint from {resolved_model_path}...")
checkpoint = torch.load(
resolved_model_path, map_location="cpu", weights_only=False
)