I now have a Sequential Neural Network which is used for predict robot states. But I have a problem when implementing the NN into Casadi to solve an MPC problem. The error keeps warning me that I can not use Casadi MX variable in a Sequential NN which requires convolution process.
I have seen the repo l4casadi but it seems only supporting nn.linear but not nn.conv1d. Hopes to find a solution here and thanks for answering.
L4CasADi supports PyTorch Models exceeding linear layers (such as convolutions). L4CasADi supports all PyTorch Models, which are jit traceable/scriptable.
L4CasADi Example with Convolution: