tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.43k stars 1.92k forks source link

Making separable Convolutions more efficient #4168

Closed susmeet-jain closed 3 years ago

susmeet-jain commented 3 years ago

Currently the time efficiency for depthwise separable convolutions in tfjs is only as good as regular convolutions.

Depthwise separable convolutions need a lot less multiplication operations then regular convolutions. And this makes them much faster on other platforms including tensorflow.

Requesting support to utilize the efficient architecture optimisations of the depthwise convolution to make it more time effiecient.

pyu10055 commented 3 years ago

@susmeet-jain I want to make sure which model type you are using, are you using the Keras layers with TFJS layers model or converted the saved model to TFJS graph model?

susmeet-jain commented 3 years ago

Thanks @pyu10055, that is an important detail to add. I am currently converting a saved model to a tfjs graph model. Not writing a TFJS layers model.

pyu10055 commented 3 years ago

@susmeet-jain thanks you for the clarification, are you referring to this keras layer? It would be really helpful if you can provide an examples that demonstrate the performance in a meaningful way, so we can track down the performance bottleneck. Thanks!

rthadur commented 3 years ago

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!