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

Is v0.4.3 nnom.py support sigmoid? #183

Open
songdaw opened this issue Mar 5, 2023 · 4 comments
Open

Is v0.4.3 nnom.py support sigmoid? #183

songdaw opened this issue Mar 5, 2023 · 4 comments

Comments

@songdaw
Copy link
Contributor

songdaw commented Mar 5, 2023

Hi,
My model use sigmoid activation like:
activation = 'sigmoid'
output = Activation(activation)(input)
and I use generate_model() in nnom.py to convert model.
I think should add
('activation' in layer.name and layer.get_config()['activation'] == 'sigmoid')
to function is_shift_layer() .

@majianjia
Copy link
Owner

For sigmoid, please use Sigmoid layer instead of Activation("sigmoid") at the moment

@songdaw
Copy link
Contributor Author

songdaw commented Mar 7, 2023

Sorry, I can't find how to use Sigmoid layer, but tf.keras.activations.sigmoid() which produce Lambda layer. Did I miss something?
I use keras=2.6.0.

@jonnor
Copy link
Contributor

jonnor commented Mar 30, 2024

Is this the right fix, just to add sigmoid to is_shift_layer ? Or are there other complications?

Btw, a workaround might be to use hard_sigmoid, it appears to be implemented

@songdaw
Copy link
Contributor Author

songdaw commented Apr 1, 2024 via email

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

No branches or pull requests

3 participants