cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation of lambda layer

JMari.5
Associate

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

1 REPLY 1
fauvarque.daniel
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.