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 Softmax layer #52

Closed
zaleslaw opened this issue May 18, 2021 · 4 comments · Fixed by #76
Closed

Add Softmax layer #52

zaleslaw opened this issue May 18, 2021 · 4 comments · Fixed by #76
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@zaleslaw
Copy link
Collaborator

We are missing some activation layers to support the export of models from Keras fully. One of them is the Softmax layer.

Add an activation layer class, write documentation for it, write a test for it, try, if possible, create a small trainable network with it (in your own GitHub) and attach a link here in the comments.

The layer should be placed here

As a reference implementation, the ReLU activation layer could be used, but feel free to improve it!

Also, support for export and import of activation layer in JSON format should be added (see ModelLoader.kt and ModelSaver.kt)

A detailed description of the activation layer can be found here

@zaleslaw zaleslaw added the good first issue Good for newcomers label May 18, 2021
@zaleslaw zaleslaw added this to the 0.3 milestone May 18, 2021
@d-lowl
Copy link
Contributor

d-lowl commented May 26, 2021

I'm currently looking into this issue and have a question regarded the expected implementation. TF/Keras Softmax layer in Python takes two arguments: the input tensor and the mask. However, the current abstract forward function does not allow that. Do we want to implement masking (and hence extending the signature for forward) or is it out of scope for this issue?

Edit: I see that Masking layer is not yet implemented, and to the best of my knowledge it's the only one that has a mask as the output.

@zaleslaw
Copy link
Collaborator Author

@d-lowl It's a reasonable question: so, I suppose we can implement this layer without a mask.

As you rightly noted, at the moment there is no support for masks, including at the level of layers and arguments. The fact is that while they are not needed for those models that are supported in the model zoo. I have a secret hope that they may not be needed.

@d-lowl
Copy link
Contributor

d-lowl commented May 27, 2021

Gotcha. I'll hopefully come back with a PR soon.

@zaleslaw
Copy link
Collaborator Author

So, I've assign it for you, if you are agree with that, to avoid two or more PRs for one tickets

@d-lowl d-lowl mentioned this issue May 30, 2021
@zaleslaw zaleslaw linked a pull request May 31, 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