Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refine keras.Activation and add tf.keras.activations. #1001

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

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

AsakusaRinne
Copy link
Collaborator

@AsakusaRinne AsakusaRinne commented Mar 5, 2023

fix: #991

This issue is actually not because of wrong computation but the absence of activation when loading model. And this is because the previous design separates Activation and ActivationName in LayerArgs. Therefore when loading the model, the ActivationName is assigned but Activation not.

This PR made the following changes:

  1. Use a class to wrap the activation function and provide a method Apply to make it similar to calling a layer.
  2. Add customized json converter for Activation to make it work with model loading.
  3. Benefited from 1, tf.keras.activations can be added to align with tensorflow python.

@AsakusaRinne AsakusaRinne added bug Something isn't working api New API or change API labels Mar 5, 2023
@AsakusaRinne AsakusaRinne changed the title Refine the keras.Activation and add tf.keras.activations. Refine keras.Activation and add tf.keras.activations. Mar 5, 2023
@Oceania2018 Oceania2018 merged commit f0e129e into SciSharp:master Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api New API or change API bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Result of model computing does not align with tf python
2 participants