barracuda-release icon indicating copy to clipboard operation
barracuda-release copied to clipboard

Trouble importing LSTM network model

Open digitalmonkey opened this issue 2 years ago • 1 comments

Hi, I'm trying to import the following LSTM model from onnx (see attached). test.onnx.zip

The output named "dense" is supposed to be a 1x80 size, but instead in Barracuda, I see the output as 10x80. Viewing the onnx file with Netron shows the 1x80 structure but Barracuda seems to have lost the size information. Does this imply the conversion was not successful?

I also am getting warnings that I have Unsupported attribute activations, node of type LSTM, Value will be ignored and defaults to [Sigmoid, Tanh, Tanh]. Does this also imply the conversion will not be successful and the resulting network will likely not infer as I expected?

Finally, as Barracuda converts to NHWC format, does this imply I must make sure to convert my arrays so that my input tensors in the same NHWC format as well? My arrays are currently stored as NCHW.

Thank you for any help you can provide.

digitalmonkey avatar Mar 02 '23 10:03 digitalmonkey

Okay one update: I was able to get the proper output once I made sure my input tensor was the correct size. However, can you confirm I need to make sure I pass in my input tensor in NHWC format? Ie., the input is not converted automatically in barracuda?

digitalmonkey avatar Mar 02 '23 11:03 digitalmonkey