Skip to content

Commit

Permalink
fix: polynomial activation
Browse files Browse the repository at this point in the history
  • Loading branch information
socathie committed Mar 15, 2023
1 parent 25e5420 commit 66d98e0
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 43 deletions.
2 changes: 1 addition & 1 deletion keras2circom/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def transpile_layer(layer: Layer, last: bool = False) -> typing.List[Component]:

if layer.op == 'Lambda':
s = SequenceMatcher(None, layer.config['function'][0], poly_activation)
if s.ratio() < 0.99:
if s.ratio() < 0.95:
raise ValueError('Only polynomial activation functions are supported')
return transpile_Poly(layer)

Expand Down
Binary file modified models/best_practice.h5
Binary file not shown.
Loading

0 comments on commit 66d98e0

Please sign in to comment.