Fix autoencoder issue

This commit is contained in:
fchollet 2015-06-14 20:58:53 -07:00
parent ce20955379
commit bf4822f675
2 changed files with 4 additions and 1 deletions

@ -379,6 +379,9 @@ class AutoEncoder(Layer):
return self.encoder.get_output(train)
def get_output(self, train):
if not train and not self.output_reconstruction:
return self.encoder.get_output(train)
decoded = self.decoder.get_output(train)
if self.tie_weights:

@ -4,7 +4,7 @@ import theano.tensor as T
import numpy as np
from six.moves import range
epsilon = 1.0e-15
epsilon = 1.0e-9
def mean_squared_error(y_true, y_pred):
return T.sqr(y_pred - y_true).mean()