I am trying to solve an optimal control problem with PDE constraint. so in online optimization the solution of PDE can not be obtained fast enough (even with different numerical methods). I need to build a neural network that approximate the solution of PDE offline and then use the resulting network instead of PDE constraint in optimization.