lmjohns3 / theanets

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

add feed_forward-like method for computing loss value #117

Open lmjohns3 opened 8 years ago

lmjohns3 commented 8 years ago

We should include the value of the loss in the output from the feed_forward method.

lmjohns3 commented 8 years ago

I tried to implement this several months ago and got what I thought were strange errors; now that I look at it again it's pretty clear that the loss can't actually be computed from the inputs to feed_forward! The feed_forward method only takes as inputs the input arrays to the network (notably not the target outputs). Losses in general (except for autoencoder losses) require target outputs to compute, so in general this isn't going to be doable as-is.

I will leave this open; we could add a method that just computes the loss, perhaps.