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

[Feature Request] Support for functional API #23

Closed
Rishit-dagli opened this issue Dec 19, 2020 · 2 comments
Closed

[Feature Request] Support for functional API #23

Rishit-dagli opened this issue Dec 19, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Rishit-dagli
Copy link

As of now, only Sequential models are supported it would be great to allow models to take inspiration from Keras Functional APIs and allow building such models. This would allow creating models that are more flexible with KotlinDL and also open up more possibilities with the kind of models one could make with KotlinDL including branching, multiple-inputs, multiple-outputs and so on

@zaleslaw
Copy link
Collaborator

zaleslaw commented Dec 25, 2020

Hi, @Rishit-dagli agree, this is an important feature.
Currently, it's not supported due to limitation of underlying Java API for TF 1.15 and limitation of C/C++ API:

  • Functional API totally based on Concatenate and its children usage (Add, Subtract and another Merge layers)
  • Concat operand is available, but gradients are not available for it
  • no ability to register custom gradient for analogue of Concat op
  • Java TF API for 1.x is frozen

Possible solution:

  • Move to Java TF API 2.x (stable version will be released in 2021)
  • Update Java TF API with custom gradients for Concat Op (because it has the same issue)
  • Write Concatenate-based layers family
  • Provide Functional API

As you see, there a lot of work, which should be done in 2021 with TF Java API community

@zaleslaw zaleslaw added the enhancement New feature or request label Jan 29, 2021
@zaleslaw zaleslaw added this to the 0.2 milestone Jan 29, 2021
@zaleslaw
Copy link
Collaborator

So, the early version of Functional API is merged. I close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants