cancel
Showing results for 
Search instead for 
Did you mean: 

Error analysing LSTM model using X-Cube-AI: ""NOT IMPLEMENTED: Order of dimensions of input cannot be interpreted""

Lemanoise
Associate

As stated, I have problem analyzing the ONNX model ported from a pytorch model. The code of the model is simple as follows:

 

class LSTM(nn.Module):

    def __init__(self, input_size, hidden_size, num_layers, num_output=1):
        super(LSTM, self).__init__()
        
        self.num_layers = num_layers
        self.input_size = input_size
        self.hidden_size = hidden_size
        self.num_output = num_output
        
        self.lstm = nn.LSTM(input_size=input_size, hidden_size=hidden_size,
                            num_layers=num_layers, batch_first=True)
        
        self.fc = nn.Linear(hidden_size, num_output)
        
    def forward(self, x, device='cuda'):
        
        ula, (h_out, _) = self.lstm(x)
        
        out = self.fc(h_out[-1])
        
        return out

 

 Netron vis:

Lemanoise_0-1734007590314.png

I will really appreciate any advice or workarounds. Thank you!

10 REPLIES 10
Lemanoise
Associate

Thank you very much!