Skip to content

Commit 39ae1c7

Browse files
ashishgit7antmarakis
authored andcommitted
necessary change in learning.py file (#1011)
* no need of if else * no need of if - else . As if hidden_layer_sizes is zero then it will not affect layer_sizes * removed comment * Update learning.py
1 parent 3617650 commit 39ae1c7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

learning.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,7 @@ def network(input_units, hidden_layer_sizes, output_units, activation=sigmoid):
838838
hidden_layers_sizes : List number of neuron units in each hidden layer
839839
excluding input and output layers
840840
"""
841-
# Check for PerceptronLearner
842-
if hidden_layer_sizes:
843-
layers_sizes = [input_units] + hidden_layer_sizes + [output_units]
844-
else:
845-
layers_sizes = [input_units] + [output_units]
841+
layers_sizes = [input_units] + hidden_layer_sizes + [output_units]
846842

847843
net = [[NNUnit(activation) for n in range(size)]
848844
for size in layers_sizes]

0 commit comments

Comments
 (0)