I believe the problem is related to NeuralDE bacause I defined model = f as you suggested and it worked! Also, I succeded in implementing a neural network with 2 inputs.
It turns out I have to look deeply into the NeuralDE nn module!
Thank you for your time and patience!