3
$\begingroup$

I was given a target function to design a neural network and train: $y = (x_1 \wedge x_2) \vee (x_3 \wedge x_4)$

The number of inputs and outputs seems obvious (4 and 1). And the training data can use a truth table.

However, in order to train it as a multilayer artificial neural network, I need to choose the number of hidden units. May I know where can I find some general guideline for this?

Thank you!

$\endgroup$
  • 2
    $\begingroup$ Consider the structure of a boolean expression: every boolean operator produces one result from two inputs, so it stands to reason that you could construct the network of 4 inputs with 2 units in the next layer (one for each $\wedge$ operator) and then a single unit in the final layer that represents the $\vee$ operator. Once you consider the domain of the inputs of $x_1, \ldots, x_4$ the weights of each neuron should be pretty straight-forward. $\endgroup$ – Francesco Gramano Mar 7 '15 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.