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

Implemented LSTM inference code shows different test loss compared to using lasagne.

I have difficulty implementing LSTM inference code using matlab. I extraced weight from trained model using theano and lasagne. And then, i coded LSTM inference(test) code using extraced weights and biases. The loss of implemented inference code…
hishin
  • 11
  • 2
1
vote
1 answer

How is Theano based ElemwiseSumLayer of Lasagne converted in Keras

I have a Net built in Theano. I am trying to convert it to Keras. net['voxres2_out'] = ElemwiseSumLayer([net['conv1c'], net['voxres2_conv2']]) Now, I want a conversion of this statement in Theano to Keras. However, I am unsure about which layer…
amankedia
  • 377
  • 2
  • 8
  • 23
1
vote
0 answers

What is the dimensionality of the weights of the gates of a GRU unit?

I am implementing a neural network in Lasagne, where I would like to share weights between different GRU layers (http://lasagne.readthedocs.io/en/latest/modules/layers/recurrent.html#lasagne.layers.GRULayer). In order to do this, I replace the…
pdekker
  • 11
  • 1
1
vote
0 answers

pickle.load give memory address in python instead of values

I am trying to load data from pickle file but it returned me memory address instead of values. Is there any solution? import numpy as np import cPickle import lasagne import theano import theano.tensor as T …
user398917
  • 11
  • 2
1
vote
3 answers

how to continue training of a pretrained model using lasagne

I trained a network with 1000 iterations and would like to continue this training up to 2000 iterations without starting from the beginning. I read different approches to this problem and wrote the code below, so at the end I have my parameters in…
csi
  • 230
  • 1
  • 7
  • 22
1
vote
1 answer

Missing method NeuralNet.train_split() in lasagne

I am learning to deal with python and lasagne. I have following installed on my pc: python 3.4.3 theano 0.9.0 lasagne 0.2.dev1 and also six, scipy and numpy. I call net.fit(), and the stacktrace tries to call train_split(X, y, self), which, I…
fairtrax
  • 416
  • 2
  • 8
1
vote
1 answer

TypeError: Incompatible broadcastable dimensions. Expected (False,), got (True,)

I am working with theano and lasagne. I am trying to use BatchNorm and I am getting this error. Can someone please guide me, what could be wrong? Or if I can get name of the variable that has this mismatch? Thanks! EDIT1: I am trying to do…
RJain
  • 21
  • 3
1
vote
0 answers

Lasagne/Theano Concatenate patches of activations

I am trying to concatenate patches of activations from different conv layers. However I keep getting errors. I believe it is an issue with merging. I put below what I've tried. Here's a small example: input_var = T.tensor4('inputs') # Building the…
Steven
  • 5,134
  • 2
  • 27
  • 38
1
vote
0 answers

Intersection and Union between two binary tensors in theano

I have two binary theano tensors (prediction and target) and I want to compute the intersection and union between these two tensors, leading to Jaccard similarity coefficient. Is there any function available in theano to do so?
Saeed
  • 742
  • 1
  • 7
  • 21
1
vote
1 answer

(Lasagne) ValueError: Input dimension mis-match

When I run my code, I get a value error with the following message: ValueError: Input dimension mis-match. (input[0].shape[1] = 1, input[2].shape[1] = 20) Apply node that caused the error: Elemwise{Composite{((i0 + i1) - i2)}}[(0, 0)](Dot22.0,…
tallosan
  • 135
  • 1
  • 7
1
vote
1 answer

Convert Lasagne Model to Keras

I want to convert a Lasagne model specification to Keras. What is the equivalent layer in Keras to this in Lasagne: nn = Conv3DDNNLayer(nn, 8, 3) # Lasagne layers The Convolution3D layer specification for Keras is:…
Chris Parry
  • 2,937
  • 7
  • 30
  • 71
1
vote
1 answer

How to reset weights of lasagne network?

I want to reset the weights of my convolutional neural network if a "nan" is detected. Im not sure how to do it. Im also confused if i should change the seed as well in this case. if np.isnan(trainingLoss): print "..Training Loss…
KenobiBastila
  • 539
  • 4
  • 16
  • 52
1
vote
0 answers

TF-Slim like argument scopes in lasagne?

Is it possible to create an argument scope in lasagne? E.g. I have a number of layers, whose constructors all should have a parameter param=5 and would like to set it up in one place: l1 = lasagne.layers.ConvLayer(x, 64, 3, pad=1,…
sygi
  • 4,557
  • 2
  • 32
  • 54
1
vote
0 answers

Multi-label classification with Theano and Lasagne?

I am trying to make the mnist.py tutorial into multi-label classification using CNN. I am very new on this field and my goal is to understand the architecture, the input-output data format in order to be more familiar and run my own multi-label…
sagrath169
  • 11
  • 2
1
vote
2 answers

Feature Extraction on Neural Networks Using Theano

I have a trained network, which consists of the following layers: {conv1, pool1, conv2, pool2, conv3, pool3, conv4, pool4, fc5, fc6, output} which fc means fully connected layers and conv means convolutional layers. I need to do feature extraction…