Questions tagged [theano]

Theano is a numerical computation library for Python. Computations are expressed using a Numpy-like syntax and compiled to run efficiently on either CPU or GPU architectures. Theano uses a mathematical computational graph and optimized the graph to speed up the computations using optimized C code. As of release 1.0, Theano will no longer be actively developed.

Theano is a Python library for performing tensor calculations with a -like syntax. Theano can be used to define, optimize, and evaluate mathematical expressions involving tensors (also see ). Some of the principal features of Theano that set it apart from other libraries have become commonplace in neural network and tensor math libraries:

  • Integrates with Numpy and provides Numpy-like syntax to express models using mathematical syntax
  • Represents calculations as computation graphs and optimizes graphs for better performance and memory utilization
  • Utilizes GPU hardware for data-intensive calculations
  • Performs high-order differentiation automatically (symbolically)
  • Compiles computation graphs into C code for faster execution

Theano enables rapid building of large-scale computational codes with less cognitive overhead and more expressive syntax. However, it is easy enough to learn that it is used in several deep learning courses (including at the University of Montreal, where it was originally developed).

Several projects build on top of Theano, including and .

As of Theano 1.0, Theano will no longer be under active development. See announcement on mailing list.

Resources

Trivia

Theano is named after a high priestess of Athena in the city of Troy, from Homer's Iliad.

2447 questions
1
vote
2 answers

How to get Elemwise{tanh,no_inplace}.0 value

I am using Deep learning Theano. How can I see the content of a variable like this: Elemwise{tanh,no_inplace}.0. It is the input data of logistic layer.
mar
  • 323
  • 2
  • 8
  • 19
1
vote
0 answers

How can I get not only an unrolled for k steps truncated-BPTT grad in theano 'scan', but also an each(1st through k-th) of components of that grad?

If I use theano.scan with a truncate_gradient=k(int >0), I can obtain a truncated-BPTT gradient for a recurrent neural network. And that gradient will be calculated for an unrolled for k steps backwards in time RNN(which becomes k-layered feed…
1
vote
1 answer

I can't install Theano on Mac OS X 10.10.5

I'm trying to install Theano (and subsequently pylearn2) with Python 3.4 on my MacBookPro, with Mac OS X 10.10.5. I have Anaconda and I follow the instructions reported on Theano's documentation…
1
vote
1 answer

Permission denied due to scipy while installing Theano

I'm installing Theano on a server where I'm not the root. I ran pip install Theano --user which returns the following error Installing collected packages: scipy Found existing installation: scipy 0.9.0 Uninstalling scipy: Exception: Traceback…
ytrewq
  • 3,670
  • 9
  • 42
  • 71
1
vote
1 answer

Running Python lasagne with CUDNN in Ubuntu 14.04 Linux

I am on a Linux 3.16.0-30-generic #40~14.04.1-Ubuntu x86_64 GNU/Linux machine with NVIDIA Corporation GF108 [GeForce GT 430] [10de:0de1] (rev a1) graphic card. I am trying to run lasagne package with GPU enabled, however by running import…
Ali Shakiba
  • 1,255
  • 2
  • 15
  • 29
1
vote
2 answers

In Python, can I call the variable from main function - use global variable?

In Python, can I call a variable from main function? Use global variable? Any help appreciated! def main(dataset, n_h, n_y, batch_size, dev_split, n_epochs): input_to_state = Linear(name='input_to_state', …
Rick
  • 189
  • 1
  • 2
  • 11
1
vote
1 answer

In Lasagne/Theano, do I need a 4d numpy array for a 4d Theano tensor?

I'm building a neural network with lasagne and am following the example from the github. I'm curious on how exactly to input into the network. In the example they state that the input layer is 4 dimensions and indeed it is a theano tensor4. Does…
Elliott Miller
  • 355
  • 2
  • 5
  • 13
1
vote
1 answer

theano finding the indices of a tensor elements in a second tensor

I can't seem to find a solution for this. Given two theano tensors a and b, I want to find the indices of elements in b within the tensor a. This example will help, say a = [1, 5, 10, 17, 23, 39] and b = [1, 10, 39], I want the result to be the…
baskaran
  • 25
  • 1
  • 7
1
vote
1 answer

Theano shared updating last element in python

I have a shared variable persistent_vis_chain which is being updated by a theano function where it gets its function from a theano.scan, But thats not the problem just back story. My shared variable looks like D = [image1, ... , imageN] where each…
sookool99
  • 262
  • 2
  • 13
1
vote
1 answer

Theano: Cannot allocate memory error for "shape.eval()" but not "np.asarray"

When I try to print the shape of a shared variable using shape.eval(), I get a "Cannot allocate memory" error. But when I convert it to a numpy array (thereby moving it to CPU), I can not only get the shape but also the array itself. See below…
user650654
  • 5,630
  • 3
  • 41
  • 44
1
vote
1 answer

Aggregate predictions with data augmentation in lasagne

I am working on the MNIST dataset and using data augmentation to train a neural network. I have a BatchIterator which randomly extracts from each picture a 24, 24 subimage, and uses it as input for the NN. As far as training is concerned,…
P. Camilleri
  • 12,664
  • 7
  • 41
  • 76
1
vote
1 answer

Theano - NameError: name 'register_gpu_opt' is not defined

I have trained a Theano model on a GPU and now want to set it up to run on a server (with no GPU). First I faced the problem that my model could not be unpickled, due to the missing CudaNdarray type. Then, following a recommendation from this post,…
Eric Leibenguth
  • 4,167
  • 3
  • 24
  • 51
1
vote
1 answer

Live plot losses while training neural net in Theano/lasagne

I'm training a neural net in Theano and lasagne, running the code in an iPython notebook. I like having the train and valid loss displayed at each iteration, like this: epoch train loss valid loss train/val valid acc dur ------- …
P. Camilleri
  • 12,664
  • 7
  • 41
  • 76
1
vote
1 answer

Installing Theano with Canopy EPD on windows 7, 64 bit

I have successfully installed theano on Canopy EPD, windows 7, 64 bit. While importing theano (for testing at first time), I am getting this error. Can anybody help. Thanks. It is similar to this question: Installing Theano on EPD (Windows…
1
vote
1 answer

Theano Import Error-Windows 7-64b

I just installed the Theano. I have a problem in importing theano in python. When I import Theano in the python 27 32 bit, in Windows 7 64 bit, I get the following errors and warning: I also should add that currently I have installed GCC 4.8.1.…
Afshin Oroojlooy
  • 1,326
  • 3
  • 21
  • 43
1 2 3
99
100