Fixes and simplification in the Keras training engine.
authorFrancois Chollet <fchollet@google.com>
Tue, 27 Feb 2018 03:57:42 +0000 (19:57 -0800)
committerGunhan Gulsoy <gunan@google.com>
Tue, 27 Feb 2018 22:33:33 +0000 (14:33 -0800)
commitccefd0a1307ac5dd39d0a254c49ce71f8c2b93e2
tree5ef5b0d8e1de8abbb51c5a198f404e40a04858a8
parent9ba9cf259b38af8425f4ee3b8967b811575fd149
Fixes and simplification in the Keras training engine.
- Explicitly disallow sample/class weighting in eager (it was never supported)
- Remove tests for it (which were actually ignoring sample/class weights)
- Make sample weight placeholders placeholder_with_default, and do not create all-ones numpy arrays to feed them when no sample weights are provided (this might lead to better performance)

PiperOrigin-RevId: 187121215
tensorflow/python/keras/_impl/keras/backend.py
tensorflow/python/keras/_impl/keras/callbacks.py
tensorflow/python/keras/_impl/keras/engine/training.py
tensorflow/python/keras/_impl/keras/engine/training_eager.py
tensorflow/python/keras/_impl/keras/engine/training_eager_test.py
tensorflow/python/keras/_impl/keras/engine/training_test.py