Skip to content

Instantly share code, notes, and snippets.

@youben11
Created September 28, 2021 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youben11/a741dbe64f87a24c0b47ba46fd35d314 to your computer and use it in GitHub Desktop.
Save youben11/a741dbe64f87a24c0b47ba46fd35d314 to your computer and use it in GitHub Desktop.
SENTENCE_LENGTH_LIMIT = 5
inferer = Inferer(model)
homomorphic_inferer = hnp.compile_fhe(
inferer.infer,
{
"x": hnp.encrypted_ndarray(bounds=(-1, 1), shape=(SENTENCE_LENGTH_LIMIT, 300))
},
config=hnp.config.CompilationConfig(
parameter_optimizer="handselected",
apply_topological_optimizations=True,
probabilistic_bounds=6,
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment