For the weights and biases solution, W&B, the length of the vector is based on the number of weights plus the number of biases in the network. The number of weights and biases is calculated based on the number of hidden layers and the number of nodes in each hidden layer in-volved in the structure solution.