Skip to content
4 changes: 2 additions & 2 deletions neural_network/2_hidden_layers_neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def predict(self, input_arr: numpy.ndarray) -> int:
>>> output_val = numpy.array(([0], [1], [1]), dtype=float)
>>> nn = TwoHiddenLayerNeuralNetwork(input_val, output_val)
>>> nn.train(output_val, 1000, False)
>>> nn.predict([0,1,0]) in (0, 1)
>>> nn.predict([0, 1, 0]) in (0, 1)
True
"""

Expand All @@ -221,7 +221,7 @@ def predict(self, input_arr: numpy.ndarray) -> int:
)
)

return int(self.layer_between_second_hidden_layer_and_output > 0.6)
return int((self.layer_between_second_hidden_layer_and_output > 0.6)[0])


def sigmoid(value: numpy.ndarray) -> numpy.ndarray:
Expand Down