ML (Estimation)
estimate_model_cost() (Helper)¶
Demonstrates the estimate_model_cost function. This is a client-side (cleartext) helper function. It is not an FHE circuit and cannot be compiled with fhe.Compiler.
In [ ]:
Copied!
from concrete_fhe_toolkit.ml.estimation import estimate_model_cost
inputset = [(3, 2, 1), (-2, -2, 3), (0, 0, 0), (2, -2, 2), (10, 5, -2)]
for inp in inputset:
try:
expected = estimate_model_cost(*inp)
print(f'Helper output: {expected}')
except Exception as e:
print(f'Skipping {inp}: {e}')
print('estimate_model_cost helper executed successfully!')
from concrete_fhe_toolkit.ml.estimation import estimate_model_cost
inputset = [(3, 2, 1), (-2, -2, 3), (0, 0, 0), (2, -2, 2), (10, 5, -2)]
for inp in inputset:
try:
expected = estimate_model_cost(*inp)
print(f'Helper output: {expected}')
except Exception as e:
print(f'Skipping {inp}: {e}')
print('estimate_model_cost helper executed successfully!')