Getting started with Lasagne on Windows 10

Installing Lasagne on Windows 10 was straight forward after following the steps here. No changes were needed apart from changing paths in “C  Compiler” section as I had Visual studio 2012 already installed.

After installation, I wanted to start with a simpler tutorial than the MNIST one from Lasagne page. I followed one from here. Since there have been interface changes to Lasagne since the tutorial was published I had to make some changes to get it to work.
I had to change

net_output = l_output.get_output()

to

net_output = lasagne.layers.get_output(l_output, deterministic=True)

and

objective = lasagne.objectives.Objective(
   l_output, 
   loss_function=lasagne.objectives.categorical_crossentropy)
loss = objective.get_loss(target=true_output)

to

loss = lasagne.objectives.aggregate(
   lasagne.objectives.categorical_crossentropy(net_output, true_output))

Also, I had to change “xrange” to “range” as I am using Python 3.

Leave a Reply

Your email address will not be published.