# HG changeset patch # User Yoshua Bengio # Date 1213727595 14400 # Node ID 9de4274ad5ba4643d70c8811d88995c711db3055 # Parent 2259f6fa4959ace15d3977b7c6a36d1ae4165e16# Parent 4efb503fd0da8fb11e51670228bb05f8f8f209aa Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn diff -r 2259f6fa4959 -r 9de4274ad5ba _test_dataset.py --- a/_test_dataset.py Tue Jun 17 14:32:03 2008 -0400 +++ b/_test_dataset.py Tue Jun 17 14:33:15 2008 -0400 @@ -533,6 +533,15 @@ del a, ds + def test_RenamedFieldsDataSet(self): + a = numpy.random.rand(10,4) + ds = ArrayDataSet(a,Example(['x','y','z','w'],[slice(3),3,[0,2],0])) + ds = FieldsSubsetDataSet(ds,['x','y','z'],['x1','y1','z1']) + + test_all(a,ds) + + del a, ds + def test_MinibatchDataSet(self): raise NotImplementedError() def test_HStackedDataSet(self): diff -r 2259f6fa4959 -r 9de4274ad5ba statscollector.py --- a/statscollector.py Tue Jun 17 14:32:03 2008 -0400 +++ b/statscollector.py Tue Jun 17 14:33:15 2008 -0400 @@ -1,7 +1,13 @@ # Here is how I see stats collectors: -# def my_stats((residue,nll),(regularizer)): +def my_stats(graph): + graph.mse=examplewise_mean(square_norm(graph.residue)) + graph.training_loss=graph.regularizer+examplewise_sum(graph.nll) + return [graph.mse,graph.training_loss] + + +# def my_stats(residue,nll,regularizer): # mse=examplewise_mean(square_norm(residue)) # training_loss=regularizer+examplewise_sum(nll) # set_names(locals())