cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube.AI Layer 'Concat' not supported :(

hofo
Associate II

Hello,

I'm using STM32Cube.AI to implement a Keras model. It comprises three parallel branches and interaction takes only at the end place where I concat the branches.

This is a simplified version to show the structure of the model:

0690X000008AdaQQAS.png

Unfortunately Concatenate is not supported :(.

 [AI:Generator]  NOT IMPLEMENTED: Unsupported cOde generation for layer 'Concat'
 [AI:Generator]  Python generation ended
 [AI:Generator]  Invalid network

I think there is a demand to support the Concatenate function 🙂 and it sholdn't be a big deal to integrate it in the code generator.

The only solution I have at this moment is to save each branch separately and concatenate them in the user application.

Is there another way to do this?

Best regards,

Oliver

5 REPLIES 5
Romain LE DONGE
Associate III

Hello,

For now there is no support of Concat layers but it should be available in the delivery of early Q3 2019

Romain

hofo
Associate II

Hello Romain,

is there an update on this issue? I tried to generate the code for a similar model:

0690X0000098EcHQAU.png

I get the following message:

Analyzing model 
Neural Network Tools for STM32 v1.0.0 (AI tools v4.0.0) 
-- Importing model 
-- Importing model - done (elapsed time 0.500s) 
-- Rendering model 
TOOL ERROR: Network graph is not bipartite.

Is the concat layer still not supported? I couldn't find which layers are supported now. The link just redirects me to https://www.st.com/en/product/x-cube-ai :(

0690X0000098EdZQAU.png

Best Regards

Oliver

Romain LE DONGE
Associate III

Hi,

I tried to reproduce your problem but it succeed on my side

I've done the network (see attached file) with an Input, two branches with Dense layers, then Concatenate and Dense again using Keras

Can you send my your model file so that I can try to reproduce on my side?

0690X0000098MKuQAM.png

Romain

Simon Narduzzi
Associate

Hello @Romain LE DONGE​ ,

I'm facing the same issue with STM32Cube.AI v4.0.0 and STMCubeMX v5.3.0, when trying to convert a Keras saved model.

"NOT IMPLEMENTED: Unsupported layer: Concat"

Is there a workaround?

Best regards,

Simon

Hello @Simon Narduzzi​  ,

I tried on my side with a generated Keras network with 'Concatenate' layers and the code is generated without any problem on X-Cube-AI 4.0.0

Following the documentation "Concatenate" layers are supported in X-Cube-AI 4.0.0:

"Concatenate: concatenate two input layers, the following attributes are supported:

  • axis: concatenation axis"

Can you send me your model so that I can try on my side with your network ?

Best regards,

Romain