cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube AI Studio fails to handle GRU state

mdeis
Associate II

Hi.  

It looks like the toolchain cannot cope with more than one GRU layer.

 

There is an error, and we cannot resolve it in this application. Please send your log by copying and pasting it to share it with edge.ai@st.com and attach your model.

 

Generate Project

Copying previous project files from C:\Users\micha\Documents\Azimuth\ARM\STMicro\STM32CubeAI\workspace\soc_gru\.ai\run\run-3 to C:\Users\micha\Documents\Azimuth\ARM\STMicro\STM32CubeAI\workspace\soc_gru\.ai\run\run-3\.ai\generate\backup

Calculating memory footprint...

Run failed: Error: analyze error: NOT IMPLEMENTED: Slice on batch dimension not supported

 

When there is more than one GRU layer, it is typical to stack the state and pass it in as one tensor.

Then it is sliced apart within the model.

But the Cube AI Studio software chokes on the slice since it is in the batch dimension.

I suppose the intention is not to support unrolling in time, but in this case there is no such issue.

Is there a work-around for this that does not involve restructuring the model and re-training?

Thanks.

 

--Mike

 

1 REPLY 1
mdeis
Associate II

FYI.  I tried splitting out the state and training for a couple epochs.

This time I used the ONNX model directly rather than converting to TFLITE first.

This also failed but failed differently.

Generate Project
Copying previous project files from C:\Users\micha\Documents\Azimuth\ARM\STMicro\STM32CubeAI\workspace\soc_gru\.ai\run\run-4 to C:\Users\micha\Documents\Azimuth\ARM\STMicro\STM32CubeAI\workspace\soc_gru\.ai\run\run-4\.ai\generate\backup
Calculating memory footprint...
Run failed: Error: analyze error: INTERNAL ERROR: Error in identification of transpose before recurrent layers during analysis of _gru2_GRU_output_0: set() vs. {_gru3_GRU_output_0}

Apparently, there is some implicit assumption about having a transpose layer somewhere at the start of the model (NHWC vs NCHW difference?).

Is this documented somewhere?

Thanks.

 

--Mike