Created
September 28, 2021 11:37
-
-
Save youben11/a741dbe64f87a24c0b47ba46fd35d314 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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