Discussion:
[theano-users] Announcement: You can training lasagne model in DIGITS now.
Xuesong Guo
2017-10-22 11:31:10 UTC
Permalink
I'm happy to announce that I have made some modifies to DIGITS to support
training lasagne model.

You need install [deepstacks.lasagne
<https://github.com/guoxuesong/deepstacks>](https://github.com/guoxuesong/deepstacks)
and [a modified version of DIGITS <https://github.com/guoxuesong/DIGITS>](https://github.com/guoxuesong/DIGITS).
You still need to install caffe, because DIGITS need it.

Please download mnist dataset following [DIGITS's GettingStarted document
<https://github.com/NVIDIA/DIGITS/blob/master/docs/GettingStarted.md>](https://github.com/NVIDIA/DIGITS/blob/master/docs/GettingStarted.md).
When creating model, select Deepstacks.lasagne instead of caffe. Click
'customize' of LeNet, and paste the following code:

```
# Example for using raw lasagne:

import deepstacks
import lasagne
from deepstacks.framework.main import *
import deepstacks.framework.using_lmdb
from deepstacks.macros import *
from deepstacks.framework.macros import *
def build_network(inputs):
network = inputs['image']
if 'mean' in inputs:
network=lasagne.layers.ElemwiseMergeLayer((network,inputs['mean']),T
.sub)
network = lasagne.layers.Conv2DLayer(
network, num_filters=20, filter_size=(5, 5),
nonlinearity=lasagne.nonlinearities.rectify,
W=lasagne.init.GlorotUniform())
network = lasagne.layers.MaxPool2DLayer(network, pool_size=(2, 2))
network = lasagne.layers.Conv2DLayer(
network, num_filters=50, filter_size=(5, 5),
nonlinearity=lasagne.nonlinearities.rectify,
W=lasagne.init.GlorotUniform())
network = lasagne.layers.MaxPool2DLayer(network, pool_size=(2, 2))
network = lasagne.layers.DenseLayer(
lasagne.layers.dropout(network, p=.5),
num_units=500,
nonlinearity=lasagne.nonlinearities.rectify)
network = lasagne.layers.DenseLayer(
lasagne.layers.dropout(network, p=.5),
num_units=10,
nonlinearity=lasagne.nonlinearities.softmax)

res, stacks, paramlayers, errors, watchpoints=deepstacks.lasagne.
build_network(network,(
(classify,'target'),
),inputs)
return res,stacks,paramlayers+[network],errors,watchpoints


```

'Show visualizations and statistics' and 'Classify Many' feature should be
ok.

Enjoy it.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...