def export_input_image(array, file_name, mirroring=False): # Construct image from the weight matrix #array = self.W.get_value() if not mirroring: array = array.T image = tiled_array_image(array) image.save(file_name)
def test_truncated_mnist(): f = gzip.open(OUTPUT_FOLDER+'mnist_training_data0.pkl.gz','rb') train_set,sums,labels = cPickle.load(f) f.close() # Plot filters after each training epoch # Construct image from the weight matrix image = tiled_array_image( train_set) image.save('truncated_input.png') f = gzip.open(MNIST_FILE,'rb') train_set, valid_set, test_set = cPickle.load(f) f.close()