Neural Network Toplogy

Edgar88
Edgar88 New Altair Community Member
edited November 2024 in Community Q&A
Hi,

I was wondering if there is a way to change the Neural Network Topology (i.e. # of hidden layers, # of hidden nodes) in the Optimize Parameters (Grid)-operator. I can't find a variable for the topology, although the Neural Net-operator  does have a setting for this. Any ideas?

Best Answer

  • yasinkaya
    yasinkaya New Altair Community Member
    Answer ✓
    Marius wrote:

    No, not yet, and to be honest it does not have high priority for us. There are a number of algorithms that we prefer a lot over the Neural Networks - SVMs for instance deliver comparable results, but are way easier to configure and to optimize and at the same time have a smaller tendency to overfit.

    However, to change at least the size of a fixed number of hidden Layers, you can create Set Macro operators inside the Loop Parameters operator, iterate the macro values and use the macros to define the sizes of the layers.

    Best, Marius
    Hi Marius,

    I used Loop Parameters operator and Set Macro operator to chane size of the layers, but I get the error: "operator cannot be executed (For input string: "ilk")" "ilk" is the macro name.


    <operator activated="true" class="neural_net" compatibility="6.4.000" expanded="true" height="76" name="Neural Net" width="90" x="112" y="30">
                    <list key="hidden_layers">
                      <parameter key="hiddenlayer" value="%{ilk}"/>
                    </list>
                  </operator>

Answers

  • Edgar88
    Edgar88 New Altair Community Member
    I read in an old post (2011) that this was on the to-do list, has it been implemented yet?
  • MariusHelf
    MariusHelf New Altair Community Member
    No, not yet, and to be honest it does not have high priority for us. There are a number of algorithms that we prefer a lot over the Neural Networks - SVMs for instance deliver comparable results, but are way easier to configure and to optimize and at the same time have a smaller tendency to overfit.

    However, to change at least the size of a fixed number of hidden Layers, you can create Set Macro operators inside the Loop Parameters operator, iterate the macro values and use the macros to define the sizes of the layers.

    Best, Marius
  • Edgar88
    Edgar88 New Altair Community Member
    Thank you Marius for the clear answer.
  • yasinkaya
    yasinkaya New Altair Community Member
    Answer ✓
    Marius wrote:

    No, not yet, and to be honest it does not have high priority for us. There are a number of algorithms that we prefer a lot over the Neural Networks - SVMs for instance deliver comparable results, but are way easier to configure and to optimize and at the same time have a smaller tendency to overfit.

    However, to change at least the size of a fixed number of hidden Layers, you can create Set Macro operators inside the Loop Parameters operator, iterate the macro values and use the macros to define the sizes of the layers.

    Best, Marius
    Hi Marius,

    I used Loop Parameters operator and Set Macro operator to chane size of the layers, but I get the error: "operator cannot be executed (For input string: "ilk")" "ilk" is the macro name.


    <operator activated="true" class="neural_net" compatibility="6.4.000" expanded="true" height="76" name="Neural Net" width="90" x="112" y="30">
                    <list key="hidden_layers">
                      <parameter key="hiddenlayer" value="%{ilk}"/>
                    </list>
                  </operator>
  • yasinkaya
    yasinkaya New Altair Community Member
    I solved my problem.
    I overlooked the situation "the macro should be defined before it can be used in parameter values.".

    I changed macro's position to before NN and simulation worked.

    Thanks.
  • yasinkaya
    yasinkaya New Altair Community Member

    Hi,

     

    I solved the problem same way, too.

     

    Thank you very much.

  • domohsen
    domohsen New Altair Community Member

    hello everyone .i need some mor help! to undersatanding this solved problem.....can you share with me some xml or jpg for more describtion...

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    Have you tried pinging @yasinkaya?