kotlindl icon indicating copy to clipboard operation
kotlindl copied to clipboard

Add SeparableConv1D layer

Open zaleslaw opened this issue 4 years ago • 4 comments

Currently, the support for SeparableConv1D is missed, and it would be great to add support for this layer. The desired PR addressing this issue should include:

  • [ ] Implementation of layer class named as SeparableConv1D (you can take inspiration from the implementation of Conv1D and SeparableConv2D as reference)
  • [ ] Common hierarchy of all SeparableConv layers with abstract class with the common functionality
  • [ ] Documentation of layer and all non-private methods
  • [ ] JUnit tests in api module
  • [ ] Support for export of layer to JSON (see ModelSaver.kt)
  • [ ] Support for import of layer from JSON (see ModelLoader.kt)

Also, if needed, you can take a look at Keras documentation for SeparableConv1D .

NOTE: for the moment, there is no need to add support for "data format" (i.e., channels last vs. channels first) in your PR; you can assume the channels are always in the last dimension.

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

zaleslaw avatar Jun 15 '21 15:06 zaleslaw

I might be able to do this, not quite sure if I understand it well enough to do this properly.

Is SerpableConv supposed to override AbstractConv or stand on its own? I take it should override. I noted in the Keras code that SerpableConv has support for two kernels (depthwise_kernel and pointwise_kernel), so should the parent kernel in AbstractConv be ignored here?

dosier avatar Jun 18 '21 11:06 dosier

I suggest creating AbstractSeparableConv looking to the AbstractConv, but without inheritance. There are a lot of different fields there: initializers, regularizers, kernels.

If it makes sense, we merge these class hierarchies.

I'll assign this ticket to you; please notify me if you will not do this.

zaleslaw avatar Jun 21 '21 12:06 zaleslaw

I will see if I can get this one done in the weekend.

dosier avatar Jun 24 '21 07:06 dosier

Hi, @dosier Are you interested in continuing working on this issue?

zaleslaw avatar Sep 13 '21 10:09 zaleslaw