Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softsign optimization #585

Merged
merged 4 commits into from
Sep 14, 2022

Conversation

nemerchiedde
Copy link
Contributor

Storing only the positive part of the Softsign is possible due to its symmetry in the Y axis. Same theory when presented in pull request: #527

@vloncar vloncar requested a review from bo3z June 30, 2022 15:07
@bo3z
Copy link
Contributor

bo3z commented Jul 1, 2022

Looks good to me. Would be nice to add a test, just to show correct behaviour. We could do it in a similar way to other activations, in test/test_keras_api.py

@nemerchiedde
Copy link
Contributor Author

Looks good to me. Would be nice to add a test, just to show correct behaviour. We could do it in a similar way to other activations, in test/test_keras_api.py

Added one test file.


print('Accuracy hls4ml relative to keras: {}'.format(acc_hls4ml))

assert acc_hls4ml >= 0.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only 0.7?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to 0.98. New tests have also been added to the pytest file.

@vloncar vloncar merged commit 83dcf8e into fastmachinelearning:main Sep 14, 2022
vloncar added a commit that referenced this pull request Sep 20, 2022
Quartus Streaming Softsign (PR #585 contd.)
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
* Softsign LUT optimization

* Test file: Activation softsign

* Changing minimal accurancy to 9.8 and adding new texts using Vivado and Quartus

Co-authored-by: Nemer Chiedde <[email protected]>
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants