メインコンテンツへスキップ

Solving a problem with a neural network constraint

ユーザーの入力を待っています。

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Pierre Bonami
    • Gurobi Staff

    Hi Othmane,

    Thanks for your question. It's hard to say why it is very slow. Some models with neural network can indeed be very slow and sometimes it is very hard to find a feasible solution.

    If you can share the model, it would be easier to have a look.

    I had a look at your python code though and the first think that comes to my mind is that it would probably be more efficient to try to formulate the polynomial of true_function directly in Gurobi.

    Gurobi can model products of variable and by creating additional variables you could directly model the polynomial in `true_function` What I mean is you can create a variable y = x*x, then to get x^3 you create a variable z=x*y,...

    This can introduce some approximation but I think it would be much smaller than the one of the neural network and the model would be more compact.

     

    Best regards,

    Pierre

     

     

    0

投稿コメントは受け付けていません。