Mercurial > pylearn
annotate test_mlp.py @ 134:3f4e5c9bdc5e
Fixes to ApplyFunctionDataSet and other things to make learner and mlp work
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Fri, 09 May 2008 17:38:57 -0400 |
parents | b4657441dd65 |
children | 0d8e721cc63c |
rev | line source |
---|---|
121 | 1 |
2 from mlp import * | |
133 | 3 import dataset |
121 | 4 |
5 def test0(): | |
133 | 6 nnet = OneHiddenLayerNNetClassifier(10,3,.1,1000) |
7 training_set = dataset.ArrayDataSet(numpy.array([[0, 0, 0], | |
8 [0, 1, 1], | |
9 [1, 0, 1], | |
10 [1, 1, 1]]), | |
11 {'input':slice(2),'target':2}) | |
12 fprop=nnet(training_set) | |
121 | 13 |
133 | 14 print fprop(training_set) |
121 | 15 |
16 test0() | |
17 |