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 Soft shrink activation function #170

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

Add Soft shrink activation function #170

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

Comments

@zaleslaw
Copy link
Collaborator

The Soft shrink activation function is missed in KotlinDL.

The desired PR addressing this issue should include:

  • Implementation of activation class named as SoftShrinkActivation (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
@michalharakal
Copy link
Contributor

Hello @zaleslaw, I would like to implement this one.

@zaleslaw
Copy link
Collaborator Author

zaleslaw commented Aug 5, 2021

Great @michalharakal will wait a PR!

@zaleslaw
Copy link
Collaborator Author

Hi, @michalharakal Do you have any updates on this issue? Do you need some help from my side?

@michalharakal
Copy link
Contributor

michalharakal commented Aug 31, 2021

@zaleslaw, sorry for delay, I was just busy with other stuff, by accident I could gave a talk on a Kotlin related conference as backup. I plan to have a look on issue this weekend.
In case, this issue is time critical, feel free to reassign it, I will pick another one later, if I have more time.

@zaleslaw zaleslaw modified the milestones: 0.3, 0.4 Sep 1, 2021
@zaleslaw
Copy link
Collaborator Author

zaleslaw commented Sep 1, 2021

I'm absolutely ok with that. I just ping you to help if something is unclear. It's not a critical issue, I moved it to the 0.4 release

michalharakal added a commit to michalharakal/KotlinDL that referenced this issue Nov 29, 2021
michalharakal added a commit to michalharakal/KotlinDL that referenced this issue Nov 30, 2021
michalharakal added a commit to michalharakal/KotlinDL that referenced this issue Nov 30, 2021
@michalharakal
Copy link
Contributor

@zaleslaw implemented with #286

zaleslaw pushed a commit that referenced this issue Dec 3, 2021
* Add initial implementation of Softshrink activation function.

Test are still missing.

* Add test based on python code.

https://github.com/tensorflow/addons/blob/master/tensorflow_addons/activations/tests/softshrink_test.py

Related-To: #170

* Reimplement SoftShrinkActivation using tf.where operand. This also fixes failing tests.

Related-To: #170
@zaleslaw zaleslaw closed this as completed Dec 3, 2021
@zaleslaw zaleslaw linked a pull request Dec 3, 2021 that will close this issue
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