Lasagne / Lasagne

Lightweight library to build and train neural networks in Theano

Home Page:http://lasagne.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi! There are some problems about creating a new layer!

wqz960 opened this issue · comments

I try to create a layer derived from MergeLayer . But I don't know how to check it, can you provide me a demo to check whether my new layer is not what I want.

But I don't know how to check it, can you provide me a demo to check whether my new layer is not what I want.

Not sure what you mean. If you just want to try interactively what your layer produces, you would compile a function that just performs a forward pass through your layer:

input1 = InputLayer(input_shape1)
input2 = InputLayer(input_shape2)
layer = MyMergeLayer((input1, input2))
fn = theano.function([input1.input_var, input2.input_var], lasagne.layers.get_output(layer))

Now you can pass data to fn and check what's happening.

In a similar way, you can also write tests that pass well-defined data to fn and compare the results to expected outputs.

(I'm closing this issue since it's not something that needs to be changed in Lasagne, feel free to still post further comments.)