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
1
vote
1 answer

Incorrect shape for arguments to lasagne function

I'm trying to build a neural network regressor using the scikit-neuralnetwork library. As I understand it, ny NN seems to be being built fine, but I keep running into the following error at the nn.predict() call: rmichael@node:~/Sandbox$ sudo python…
Roney Michael
  • 3,964
  • 5
  • 30
  • 45
1
vote
2 answers

Lasagne - error

i am trying to learn neural nets / lasagne by using the code in Robert Layton's Learning Data Mining with Python. I think i am following the code to the letter, but i get the following error message. any hints or intuition what i am doing wrong much…
user1885116
  • 1,757
  • 4
  • 26
  • 39
1
vote
2 answers

Installing nolearn (python machine learning) results in error

I am attempting to install nolearn, a python machine learning library (based upon theano and lasagne), and am receiving an unusual error (note: the command is the first step in installing nolearn as install docs): COMMAND: sudo pip install -r…
Eric Broda
  • 6,701
  • 6
  • 48
  • 72
1
vote
1 answer

lasagne - unexpected keyword error

I am trying to learn machine learning in Python - and would like to run the lasagne / nolearn packages. I have installed all packages - and am using the script per below (from http://semantive.com/deep-learning-examples/) which gives the following…
user1885116
  • 1,757
  • 4
  • 26
  • 39
1
vote
1 answer

Lasagne 1D Convolution Error

I am trying to build a CNN using Lasagne and I have 119 feature variables. I am able to successfully build a MLP using Lasagne but when I try to add a Convolutional layer (using 1D convolution) using the following code, I get an error. Am I doing…
Adi
  • 13
  • 2
1
vote
1 answer

Lasagne, MLP zero outputs

I was getting strange results when trying to learn some simple MLP and after stripping the code from everything but what was essential and shrinking it I'm still getting results that are strange. Code: import numpy as np import theano import…
mihahauke
  • 11
  • 2
1
vote
0 answers

Cannot make this autoencoder network function properly (with convolutional and maxpool layers)

Autoencoder networks seems to be way trickier than normal classifier MLP networks. After several attempts using Lasagne all what I get in the reconstructed output is something that resembles at its best a blurry averaging of all the images of the…
1
vote
1 answer

Convolutional Net With Lasange - image resizing

I've been training some neural and convolutional nets with Lasagne and was doing most of my data/image preprocessing using Python. However I would like to incorporate some of this into my Lasagne layers to make my code more flexible. Is there a…
mjacuse
  • 79
  • 1
  • 5
1
vote
1 answer

How to calculate F1-micro score using lasagne

import theano.tensor as T import numpy as np from nolearn.lasagne import NeuralNet def multilabel_objective(predictions, targets): epsilon = np.float32(1.0e-6) one = np.float32(1.0) pred = T.clip(predictions, epsilon, one - epsilon) …
Kun
  • 581
  • 1
  • 5
  • 27
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
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

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

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
2 answers

Get output from Lasagne (python deep neural network framework)

I loaded the mnist_conv.py example from official github of Lasagne. At the and, I would like to predict my own example. I saw that "lasagne.layers.get_output()" should handle numpy arrays from official documentation, but it doesn't work and I cannot…
Jlearner
  • 11
  • 3
0
votes
0 answers

Unable to "import from lasagne.layers.theta import ThetaLayer" and "from lasagne.layers.timefusion import MaskingLayer"

I am trying to reproduce a paper (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5890980/pdf/pone.0195024.pdf) on predicting hospital readmission. Code at: https://github.com/danicaxiao/CONTENT. I am stuck in the following line and unable to locate…