autoencoders
autoencoders copied to clipboard
test_sa.py fails..
Here is the stack trace..
givens={self.x: data_shared[index * batch_size: (index + 1) * batch_size]}) Started the training.
Training at epoch 0
ValueError Traceback (most recent call last)
/home/user/workspace/experiments/autoencoders/tests/test_sa.py in
/home/user/workspace/experiments/autoencoders/sa.pyc in fit(self, data, learning_rate, batch_size, n_epochs, sparsity_penalty, sparsity_level, weights_file) 89 print "Training at epoch %d" % epoch 90 for batch_index in xrange(n_batches): ---> 91 ae_costs.append(train_ae(batch_index)) 92 print "Training at epoch %d, %f" % (epoch, numpy.mean(ae_costs)) 93
/home/user/anaconda/lib/python2.7/site-packages/theano/compile/function_module.pyc in call(self, _args, *_kwargs) 586 # For the CVM 587 gof.vm.raise_with_op(self.fn.nodes[self.fn.position_of_error], --> 588 self.fn.thunks[self.fn.position_of_error]) 589 else: 590 # For the c linker
/home/user/anaconda/lib/python2.7/site-packages/theano/compile/function_module.pyc in call(self, _args, *_kwargs) 577 t0_fn = time.time() 578 try: --> 579 outputs = self.fn() 580 except Exception: 581 if hasattr(self.fn, 'position_of_error'):
ValueError: Input dimension mis-match. (input[0].shape[1] = 784, input[1].shape[1] = 2000) Apply node that caused the error: Elemwise{Composite{[tanh(add(i0, i1))]}}[(0, 0)](Dot22.0, InplaceDimShuffle{x,0}.0) Inputs shapes: [(100, 784), (1, 2000)] Inputs strides: [(6272, 8), (16000, 8)] Inputs types: [TensorType(float64, matrix), TensorType(float64, row)]