Questions tagged [lasagne]

Lasagne provides a high-level API for creating neural networks using Theano on the backend. Questions about lasagne do not need to also utilize the "theano" tag, unless the question is specifically about Lasagne-Theano integration or the Theano backend.

Lasagne is a Python package build around expressions for neural networks training. was designed as a high-level API on top of , with the intention of making rapid prototyping of neural network architectures easier. It is similar in spirit to , which is built as a high-level API on top of //, although the main difference is that Lasagne implements only one backend, allowing it to integrate more deeply with Theano features.

Resources

Resources and Teaching

Implementations of Network Architectures

204 questions
3
votes
1 answer

Lasagne / Theano gradient values

I'm currently working on recurrent neural nets using Lasagne / Theano. While training, updates are calculated using Theano's symbolic gradient. grads = theano.grad(loss_or_grads, params) While the gradient expression is perfectly fine in general,…
s1hofmann
  • 1,491
  • 1
  • 11
  • 22
3
votes
0 answers

Lasagne autoencoder: how do I just use the decoder part?

Let's say I have an autoencoder in Lasagne, with two encoding layers, and two InverseLayers as a decoder: input = InputLayer(...) l1 = Conv1DLayer(input, ...) l2 = DenseLayer(l1, ...) # decoder part: l2p = InverseLayer(l2, l2) l1p =…
user42541
  • 947
  • 6
  • 6
3
votes
1 answer

Using convolutional layers in lasagne with OpenCL

I have an AMD graphic card, so I have to use OpenCL. After a long time installing I almost get it working, and the only thing I am unable to do is to use convolutional layers. I get an error: AssertionError: AbstractConv2d Theano optimization…
Lilith
  • 33
  • 3
3
votes
1 answer

Simple lasagne network output is very slow

I'm trying to train an extremely simple neural network with Lasagne: one dense layer with one output, without nonlinearity (so it's simply a linear regression). Here's my code: #!/usr/bin/env python import numpy as np import theano import…
3
votes
1 answer

Calculate gradient for only part of a shared variable array

I want to do the following: import theano, numpy, theano.tensor as T a = T.fvector('a') w = theano.shared(numpy.array([1, 2, 3, 4], dtype=theano.config.floatX)) w_sub = w[1] b = T.sum(a * w) grad = T.grad(b, w_sub) Here, w_sub is for example…
3
votes
1 answer

Best practice for training on large scale datasets like ImageNet using Theano/Lasagne?

I found that all of the examples of Theano/Lasagne deal with small data set like mnist and cifar10 which can be loaded into memory completely. My question is how to write efficient code for training on large scale datasets? Specifically, what is the…
kli_nlpr
  • 894
  • 2
  • 11
  • 25
3
votes
1 answer

Lasagne mlp target out of bound

Hi I am trying to modify the mnist example to match it to my dataset. I only try to use the mlp example and it gives a strange error. Tha dataset is a matrix with 2100 rows and 17 columns, and the output should be one of the 16 possible classes. The…
kenji
  • 61
  • 3
3
votes
1 answer

Use CUDA in virtualenv to serve Theano

Lacking root permissions I installed Theano and Lasagne in a python3 virtualenv at Ubuntu 14.04. Running some code, I get an ImportError: dnn not available, which as far as I see results from missing CUDA header, although it is installed at…
frthjf
  • 251
  • 3
  • 13
3
votes
1 answer

Modifying perform function in Theano.tensor.nnet.softmax

I have just begun using lasagne and Theano to do some machine learning on Python. I am trying to modify the softmax class in Theano. I want to change how the activation function(softmax) is calculated. Instead of dividing e_x by e_x.sum(axis=1), I…
3
votes
1 answer

nolearn 0.5 are not compatible with lasagne 0.1 or 0.2?

When I want to import: from nolearn.lasagne import NeuralNet I always got this error "cannot import name mse". My Theano version is 0.7.0.
Kun
  • 581
  • 1
  • 5
  • 27
2
votes
0 answers

Cannot import name 'MRG_RandomStreams' from 'theano.sandbox.rng_mrg'

I tried importing Lasagne in my code which is as follows: from __future__ import print_function import sys import os import time import string import random import pickle import numpy as np import theano import theano.tensor as T import lasagne But…
2
votes
1 answer

pygpu problem : DLL load failed: The specified procedure could not be found

When Trying to run a model in Theano on anaconda Using TensorFlow backend. pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html F:\anaconda\lib\site-packages\theano\gpuarray\dnn.py:184: UserWarning: Your cuDNN version…
abtExp
  • 9
  • 1
  • 14
2
votes
0 answers

How to make hidden-to-hidden weight matrix in recurrent neural net fixed and not trainable in lasagne?

In Lasagne, Layer class has field params which, according to the documentation, stores all registered parameters along with their tags in the ordered dictionary. However, for the layer of the type RecurrentLayer input-to-hidden and hidden-to-hidden…
polkir
  • 21
  • 1
2
votes
1 answer

Lasagne - Why is the Validation Loss Highlighted Green?

I'm running the MNIST Neural Network example and when training the classifier, the Validation Loss column (and training loss) has some values highlighted in green. If i have the learning rate at 0.01, all are green, however if i increase it to 0.1,…
Waddas
  • 1,353
  • 2
  • 16
  • 28
2
votes
1 answer

How to train neural networks with multi-channel 1D objects?

The aim is to implement a neural network architecture with multiple channels (i.e. input layers) of 1D objects (e.g. time series). The idea is to apply independent operations in any channel before combining the feature maps of any channel to output…
MLguy
  • 1,776
  • 3
  • 15
  • 28
1 2
3
13 14