Skip to content

Commit 4af0372

Browse files
committed
Improving comments
1 parent 91821a2 commit 4af0372

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

code/deep_autoencoder.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ def train(self, training_data, epochs, mini_batch_size, eta,
7676
def train_nested_autoencoder(
7777
self, j, training_data, epochs, mini_batch_size, eta, lmbda):
7878
"""
79-
Train the nested autoencoder that starts at level ``j`` in the
80-
deep autoencoder. Note that ``training_data`` should be of
81-
the form ``(x, x)`` for appropriate inputs ``x`` at that
82-
layer. """
79+
Train the nested autoencoder that starts at layer ``j`` in the
80+
deep autoencoder. Note that ``training_data`` should be a
81+
list with entries of the form ``(x, x)``, where the ``x`` are
82+
encoded training inputs for layer ``j``."""
8383
net = Network([self.layers[j], self.layers[j+1], self.layers[j]])
8484
net.biases[0] = self.biases[j]
8585
net.biases[1] = self.biases[-j-1]
@@ -100,7 +100,8 @@ def train_nested_autoencoder_repl(
100100
data for the first layer of the network, and is a list of
101101
entries ``x``."""
102102
self.train_nested_autoencoder(
103-
j, double(
103+
j,
104+
double(
104105
[self.feedforward(x, start=0, end=j) for x in training_data]),
105106
epochs, mini_batch_size, eta, lmbda)
106107

0 commit comments

Comments
 (0)