lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 74 forks source link

Itertrain method to include validation set errors #63

Closed dnth closed 9 years ago

dnth commented 9 years ago

It would be really nice to have the itertrain method to return the validation set errors in order for a plot of learning curves.

lmjohns3 commented 9 years ago

I've changed the training interface to generate a (train, valid) monitor pair after every iteration. The validation monitors might not be updated every training iteration, but whatever is most recent will be returned.

for train, valid in exp.itertrain(dataset):
    print('training loss:', train['loss'])
    print('most recent validation loss:', valid['loss'])