3 ms·
See the release notes: https://github.com/fchollet/keras/wiki/Keras-2.0-release-notes https://github.com/fchollet/keras/wiki/Keras-2.0-release-not... - You can
by fchollet 10y ago
See the release notes: https://github.com/fchollet/keras/wiki/Keras-2.0-release-notes https://github.com/fchollet/keras/wiki/Keras-2.0-release-not...
- You can use a Keras model to compute some tensor(s), turn that into a loss, and manually add that loss to the model via `add_loss` (it just needs to only depend on the model's inputs).
- Not all of your model outputs have to have a loss associated with them. So you can do both {input, output}->loss and input->output in your workflow, as you wish. Effectively, losses and outputs are decoupled.
The VAE example hasn't yet been updated to use the `add_loss` feature, but it should be.
- andrew3726 10y agoI will look into updating the VAE example, as I've ported the example to the keras 2.0 API recently. There is currently no documentation on add_loss as far as I can see, so I will have to try a few things.