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
18
votes
6 answers

theano g++ not detected

I installed theano but when I try to use it I got this error: WARNING (theano.configdefaults): g++ not detected! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations.…
rggir
  • 181
  • 1
  • 1
  • 3
17
votes
1 answer

Neural Network Ordinal Classification for Age

I have created a simple neural network (Python, Theano) to estimate a persons age based on their spending history from a selection of different stores. Unfortunately, it is not particularly accurate. The accuracy might be hurt by the fact that the…
17
votes
3 answers

How can I change device used of theano

I tried to change the device used in theano-based program. from theano import config config.device = "gpu1" However I got error Exception: Can't change the value of this config parameter after initialization! I wonder what is the best way of…
Alex Gao
  • 2,073
  • 4
  • 24
  • 27
16
votes
3 answers

Why is the convolutional filter flipped in convolutional neural networks?

I don't understand why there is the need to flip filters when using convolutional neural networks. According to the lasagne documentation, flip_filters : bool (default: True) Whether to flip the filters before sliding them over the input, …
16
votes
3 answers

ValueError «You are trying to use the old GPU back-end» when importing keras

I'm using Keras with the Theano backend on Ubuntu 16.04. My setup has been working without issues, however, all of a sudden I get the following error when I import Keras (import keras): ValueError: You are trying to use the old GPU back-end. It was…
Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
16
votes
3 answers

How to change the temperature of a softmax output in Keras

I am currently trying to reproduce the results of the following article. http://karpathy.github.io/2015/05/21/rnn-effectiveness/ I am using Keras with the theano backend. In the article he talks about controlling the temperature of the final…
chasep255
  • 11,745
  • 8
  • 58
  • 115
16
votes
2 answers

Is there a common format for neural networks

Different teams use different libraries to train and run neural networks (caffe, torch, theano...). This makes sharing difficult: each library has its own format to store networks and you have to install a new library each time you want to test…
David
  • 1,898
  • 2
  • 14
  • 32
16
votes
1 answer

Using Python+Theano with OpenCL in an AMD GPU

I'm trying to use Python with Theano to accelerate some code with OpenCL. I installed libgpuarray and pygpu as instructed (I think), and got no errors. The installation detected the OpenCL runtime installed. I just cannot run the Theano example for…
Alejandro Piad
  • 1,827
  • 1
  • 16
  • 23
16
votes
3 answers

Error importing Theano

After installing python, numpy, scipy and theano to ~/.local, I tried to import theano but it threw an error: >>> import theano Problem occurred during compilation with the command line below: g++ -shared -g -march=core2 -mcx16 -msahf --param…
minhle_r7
  • 771
  • 9
  • 20
15
votes
2 answers

How can I speed up deep learning on a non-NVIDIA setup?

Since I only have an AMD A10-7850 APU, and do not have the funds to spend on a $800-$1200 NVIDIA graphics card, I am trying to make due with the resources I have in order to speed up deep learning via tensorflow/keras. Initially, I used a…
Thornhale
  • 2,118
  • 1
  • 23
  • 40
15
votes
3 answers

Theano CNN on CPU: AbstractConv2d Theano optimization failed

I'm trying to train a CNN for object detection on images with the CIFAR10 dataset for a seminar at my university but I get the following Error: AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available…
Jonasson
  • 293
  • 1
  • 2
  • 11
15
votes
7 answers

Installing theano on Windows 8 with GPU enabled

I understand that the Theano support for Windows 8.1 is at experimental stage only but I wonder if anyone had any luck with resolving my issues. Depending on my config, I get three distinct types of errors. I assume that the resolution of any of my…
Matt
  • 2,289
  • 6
  • 29
  • 45
14
votes
3 answers

Keras multiply layer output with scalar

I have a layer output I want to multiply by a scalar. I can do this with a lambda layer ie sc_mult = Lambda(lambda x: x * 2)(layer) which works fine. But if I want to use a different scalar for each example, I try to supply these as a second input,…
Luke_radio
  • 977
  • 1
  • 9
  • 15
14
votes
1 answer

Keras: What if the size of data is not divisible by batch_size?

I am new to Keras and just started working on some examples. I am dealing with the following problem: I have 4032 samples and use about 650 of them as for the fit or basically the training state and then use the rest for testing the model. The…
ahajib
  • 12,838
  • 29
  • 79
  • 120
14
votes
1 answer

Windows missing Python.h

I'm trying to run a sample Theano code that uses GPU on windows. My python (with python-dev and Theano and all required libraries) was installed from Anaconda. This is the error I run into: Cannot open include file: 'Python.h': No such file or…
user1934733
  • 171
  • 1
  • 1
  • 6