Implementing Mul and Add layers (BatchNorm) using Graph APIs
Hi,
Output of 'strings libarm_compute.so | grep arm_compute_version': arm_compute_version=v18.11 Build options: {'embed_kernels': '1', 'gles_compute': '1', 'logging': '1', 'arch': 'arm64-v8a', 'opencl': '1', 'neon': '1', 'asserts': '1', 'debug': '0', 'os': 'android', 'Werror': '1'} Git hash=3e135c20f49baec9f4c16df11efa6605fa4a7c14
Platform: arm64-v8a
Operating System: Android 7.1
Problem description:
I am not able to find the exact similar implementation of Add and Mul mentioned in the below graph node. I have captured this using TensorBoard.

Here in the attached node the input tensor is of 150x150x32 and the output will remain of the same shape. When I extracted the weights from TensorFlow implementation of Add_1 (_97_cf_100) and Mul_1 (_96_cf_99) nodes, they are having one dimension shape of 32. So I can not use those weights in ScaleLayer() as ScaleLayer expects the pixelwise weights not per Channel (just like we have in BatchNormalizationLayer).
I also tried by providing these weights as Mean and Variance to BN layer but it didn't gave proper results.
Can you please help in implementing the mentioned Layers in ACL using Graph APIs? Let me know if you need more info.
Thanks, KGor
Hi @krgor Could you please provide more details of the Add and Mul operators you need? Even the links to the operators in the tensorflow online documentation would suffice
Thanks, Manuel
Hi @ManubARM
I could able to resolve it by transposing the weights which were extracted from tensorflow and then passed to ScaleLayer() of Graph APIs.
So tensorflow is having weights in one dimension. I just reshaped as below. data = data.reshape(data.shape[0], 1, 1).copy()
We can close this ticket. Thanks, KGor
Thanks @krgor for sharing how you solved the issue