From fe093237ede54aa1a271baeeeb7399b40c133a49 Mon Sep 17 00:00:00 2001 From: Job333 Date: Sun, 22 Jul 2018 12:27:52 +0200 Subject: [PATCH] Declared X_in as dtype='float32' in autoencoder.py train_op ran into trouble as default theano.tensor.matrix is of type float64 while all other variables are of type float32. Declaring X_in as dtype='float32' fixes the problem. --- unsupervised_class2/autoencoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsupervised_class2/autoencoder.py b/unsupervised_class2/autoencoder.py index 87633fa1..4e9b85eb 100644 --- a/unsupervised_class2/autoencoder.py +++ b/unsupervised_class2/autoencoder.py @@ -60,7 +60,7 @@ def fit(self, X, learning_rate=0.5, mu=0.99, epochs=1, batch_sz=100, show_fig=Fa self.dparams = [self.dW, self.dbh, self.dbo] self.forward_dparams = [self.dW, self.dbh] - X_in = T.matrix('X_%s' % self.id) + X_in = T.matrix('X_%s' % self.id, dtype='float32') X_hat = self.forward_output(X_in) # attach it to the object so it can be used later @@ -177,7 +177,7 @@ def fit(self, X, Y, Xtest, Ytest, for ae in self.hidden_layers: self.params += ae.forward_params - X_in = T.matrix('X_in') + X_in = T.matrix('X_in', dtype='float32') targets = T.ivector('Targets') pY = self.forward(X_in) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy