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

Get rid of Activations enum #41

Open
ileasile opened this issue Mar 3, 2021 · 5 comments
Open

Get rid of Activations enum #41

ileasile opened this issue Mar 3, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ileasile
Copy link

ileasile commented Mar 3, 2021

Activations enum duplicates Activation interface and makes adding new activation function harder for library contributors and impossible for library users.

Get rid of enum and add convenient "provider" service which stores activation functions objects.

@zaleslaw
Copy link
Collaborator

zaleslaw commented Mar 3, 2021

A good idea, I will think about it. Thanks

@zaleslaw zaleslaw added this to the 0.3 milestone May 18, 2021
@zaleslaw zaleslaw self-assigned this Jun 15, 2021
@knok16
Copy link
Contributor

knok16 commented Aug 25, 2021

What do you think about the next course of action:

  1. Replace usages of Activations enum with Activation interface
  2. Move all implementations of Activation interface (SigmoidActivation, LishtActivation, etc) into separate files and move documentation from Activations enum into implementation classes
  3. Delete Activations enum or maybe transform it into the registry of activation functions like:
object Activations {
    val Linear = LinearActivation()
    val Sigmoid = SigmoidActivation()
    ...
  1. Remove some of the Activation layers, for example org.jetbrains.kotlinx.dl.api.core.layer.activation.ELU since right now there are 2 ways to create ELU activation layer: org.jetbrains.kotlinx.dl.api.core.layer.activation.ELU() and ActivationLayer(EluActivation()) - and it means 2x more code to support

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

I agree with your argument about the importance of customization and it's a part of Keras's spirit too.
I suggest planning these API changes in the next release, 0.4.

We should raise a discussion and ask the community about a few of the proposed API changes.

@zaleslaw zaleslaw added enhancement New feature or request help wanted Extra attention is needed labels Sep 13, 2021
@knok16
Copy link
Contributor

knok16 commented Sep 13, 2021

Agree, such changes can break API, plus it can differ from Keras API, which is one more thing to consider before implementing such changes (since it can complicate adoption)

@zaleslaw
Copy link
Collaborator

I suppose we could go far from the basic Keras API in a few moments to be a more Kotlin framework adopting the best Kotlin features

@zaleslaw zaleslaw modified the milestones: 0.4, 0.5 Feb 21, 2022
@ermolenkodev ermolenkodev removed this from the 0.5 milestone Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants