2021-05-06 07:49 AM
Hello
I am trying to implement an RNN which contains a lambda layer. It works perfectly on keras but gives me an error in STM32CubeIDE
I have read in the documentation that it should be possible to implement a lambda layer in the X-CUBE-AI 6.0.0 and followed the advice there but nothing works.
The lambda layer I am trying to implement is:
x2=layers.Lambda(lambda q: q[:, -1])(x)
Which basically takes just one column from another layer.
Do you know how can I implement this layer or maybe a workaround using another kind of trick?
Thanks
2021-05-06 08:12 AM
How to have lambda and custom layers is described in the X-Cube-AI documentation embedded in the package.
I guess is your case you'll have to provide also the C code.
The documentation is located on your machine under your home directory, typically here
file:///C:/Users/xxxx/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/6.1.0/Documentation/how_to_do_keras_lambda_custom.html
Regards
Daniel