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

Add HardShrink activation function #166

Closed
5 tasks
zaleslaw opened this issue Jul 29, 2021 · 2 comments · Fixed by #182
Closed
5 tasks

Add HardShrink activation function #166

zaleslaw opened this issue Jul 29, 2021 · 2 comments · Fixed by #182
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@zaleslaw
Copy link
Collaborator

zaleslaw commented Jul 29, 2021

The Hard shrink activation function is missed in KotlinDL.

The desired PR addressing this issue should include:

  • Implementation of activation class named as HardShrinkActivation (you can take inspiration from the implementation of HardSigmoid as reference) added to the Activations.kt file
  • Documentation of activation function
  • JUnit tests in api module
  • Support for export of activation function to JSON (see ModelSaver.kt)
  • Support for import of activation function from JSON (see ModelLoader.kt)

P.S. If you want to take this ticket, please leave the comment below
P.P.S Read the Contributing Guidelines.

The reference implementation could be taken from tensorflow-addons

@zaleslaw zaleslaw added the good first issue Good for newcomers label Jul 29, 2021
@zaleslaw zaleslaw added this to the 0.3 milestone Jul 29, 2021
@therealansh
Copy link
Contributor

Hey @zaleslaw , i can take this one up to complete 0.3 milestones quick. But does Ops provide any comparison function since it requires lower and upper value to be compared?

@zaleslaw
Copy link
Collaborator Author

zaleslaw commented Aug 6, 2021

Hmm, you right about upper/lower values. Could it be implemented via composition of tf.maximum(tf.minimum(input, lower), upper)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants