comparison statscollector.py @ 345:4efb503fd0da

Added test for dataset/RenamedFieldsDataSet
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Tue, 17 Jun 2008 14:32:54 -0400
parents fe57b96f33d4
children
comparison
equal deleted inserted replaced
339:aa8aff6abbf7 345:4efb503fd0da
1 1
2 # Here is how I see stats collectors: 2 # Here is how I see stats collectors:
3 3
4 # def my_stats((residue,nll),(regularizer)): 4 def my_stats(graph):
5 graph.mse=examplewise_mean(square_norm(graph.residue))
6 graph.training_loss=graph.regularizer+examplewise_sum(graph.nll)
7 return [graph.mse,graph.training_loss]
8
9
10 # def my_stats(residue,nll,regularizer):
5 # mse=examplewise_mean(square_norm(residue)) 11 # mse=examplewise_mean(square_norm(residue))
6 # training_loss=regularizer+examplewise_sum(nll) 12 # training_loss=regularizer+examplewise_sum(nll)
7 # set_names(locals()) 13 # set_names(locals())
8 # return ((residue,nll),(regularizer),(),(mse,training_loss)) 14 # return ((residue,nll),(regularizer),(),(mse,training_loss))
9 # my_stats_collector = make_stats_collector(my_stats) 15 # my_stats_collector = make_stats_collector(my_stats)