Skip to content

Commit b5c9464

Browse files
committed
Refactoring DeepAutoencoder
1 parent e5e69d3 commit b5c9464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

code/deep_autoencoder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ def train(self, training_data, epochs, mini_batch_size, eta,
7474
lmbda[-1])
7575

7676
def train_nested_autoencoder(
77-
self, j, training_data, epochs, mini_batch_size, eta, lmbda):
77+
self, j, encoded_training_data, epochs, mini_batch_size, eta, lmbda):
7878
"""
7979
Train the nested autoencoder that starts at layer ``j`` in the
80-
deep autoencoder. Note that ``training_data`` should be a
80+
deep autoencoder. Note that ``encoded_training_data`` is a
8181
list with entries of the form ``(x, x)``, where the ``x`` are
8282
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]
8686
net.weights[0] = self.weights[j]
8787
net.weights[1] = self.weights[-j-1]
88-
net.SGD(training_data, epochs, mini_batch_size, eta, lmbda)
88+
net.SGD(encoded_training_data, epochs, mini_batch_size, eta, lmbda)
8989
self.biases[j] = net.biases[0]
9090
self.biases[-j-1] = net.biases[1]
9191
self.weights[j] = net.weights[0]

0 commit comments

Comments
 (0)