Error analysing LSTM model using X-Cube-AI:INTERNAL ERROR : Unkonwn dimensions : CH
When I analyze the ONNX model in CubeAl,it says INTERNAL ERROR : Unkonwn dimensions : CH.The code of the model is simple as follows,input_size = 1 hidden_size = 1 output_size = 1 num_layers = 1
I don't know why and I will really appreciate any advice or workarounds. Thank you:
class LSTMNet(nn.Module):
def __init__(self, input_size, hidden_size, output_size, num_layers=1)
super(LSTMNet, self).__init__()
self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=False) # batch_first=False
self.fc = nn.Linear(hidden_size, output_size)
def forward(self, x):
h0 = torch.zeros(num_layers, x.size(1), hidden_size).to(x.device)
c0 = torch.zeros(num_layers, x.size(1), hidden_size).to(x.device)
out, _ = self.lstm(x, (h0, c0))
out = self.fc(out[-1, :, :])
return out

