Skip to content

Commit 9d87420

Browse files
committed
Removed unused cost function
1 parent 3cb6b36 commit 9d87420

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

code/network_basic.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,12 @@ def evaluate(self, test_data):
119119
for (x, y) in test_data]
120120
return sum(int(x == y) for (x, y) in test_results)
121121

122-
def cost(self, x, y):
123-
"""Return the quadratic cost associated to the network, with
124-
input ``x`` and desired output ``y``. Note that there is no
125-
regularization."""
126-
return np.sum((self.feedforward(x)-y)**2)/2.0
127-
128122
def cost_derivative(self, output_activations, y):
129123
"""Return the vector of partial derivatives \partial C_x /
130-
\partial a for the output activations, ``a``. For the
131-
unregularized quadratic cost this is just the difference
132-
between the output activations and the desired output, ``y``."""
124+
\partial a for the ``output_activations``. For the
125+
(unregularized) quadratic cost this is just the difference
126+
between the ``output_activations`` and the desired output,
127+
``y``."""
133128
return (output_activations-y)
134129

135130
#### Miscellaneous functions

0 commit comments

Comments
 (0)