ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

"Swish" activation function in ACL

Open krgor opened this issue 6 years ago • 2 comments

Hi,

I am using ACL 20.02 on Android 8.1.

I want to use swish activation function in my model which is defined as below: f(x) = x · σ(x), where σ(z) = (1 + exp(−z))−1 [Sigmoid/LOGISTIC]

I am not seeing such implementation in ACL. I am primarily using Graph APIs. Can you please consider this as a new feature request and tell if this can be implemented in upcoming releases.

It will be of great help if you can provide some hint if I can replicate swish activation by combination of some other layers.

Thanks, krgor

krgor avatar May 14 '20 15:05 krgor

Hi @krgor

Please take a look at these patches adding support for hard swish :

https://review.mlplatform.org/c/ml/ComputeLibrary/+/2802 https://review.mlplatform.org/c/ml/ComputeLibrary/+/2823 https://review.mlplatform.org/c/ml/ComputeLibrary/+/2848

This will be supported in 20.05. In the meantime you could cherry pick these patches or just checkout the master development branch.

Hope this helps.

morgolock avatar May 15 '20 07:05 morgolock

Thanks @morgolock ,

It will definitely help. I will look into it.

Regards, krgor

krgor avatar May 16 '20 08:05 krgor