Skip to main content
jkayo.1
Associate
May 3, 2023
Question

It seems that the X-CUBE-AI code generated the wrong shape for the tensors. The correct shape of the input tensor for exemple should be (7, 6, 6, 1) but the generated code has (1, 6, 6, 7). This means that the strides are incorrect.how can i fix this

  • May 3, 2023
  • 2 replies
  • 972 views

..

This topic has been closed for replies.

2 replies

ST Employee
May 4, 2023

Hello,

Is it possible to have more details? Is it a ONNX model? X-CUBE-AI version?

The input tensor is a 4d tensor, if we not consider the batch dimension. what is the type of the operator in relation with this input tensor?

br,

JM

jkayo.1
jkayo.1Author
Associate
May 4, 2023

Hello, 

Thanks for your help!.

I generate the files by converting ". H5 file" (using keras, tensorflow) using CUBEMX, the shape of the tensors was correct in this step after the generation of files (network.c,...), I realize that my input shape which declared in python was (Batch, Depth, Height, width, Channel) :(1, 7,6,6,1)was inverted to ( 1,6,6,7,1). 

All tensors in the model were inverted. I tried to manually change the shape of the tensors in network.c but it causes errors in the model creation.