Keras: How to pass sample_weigths to validation data?

Created on 18 Jun 2016  路  1Comment  路  Source: keras-team/keras

In the method fit of a keras model, there is a parameter (sample_weights) which passes sample weights for training data. I think that is reasonable to also pass sample_weights for computing validation loss, so that overfitting can be tracked in these settings. Is this possible?

Most helpful comment

Just pass as validation_data a triplet (samples, labels, sample_weights) instead of just (samples, labels).

>All comments

Just pass as validation_data a triplet (samples, labels, sample_weights) instead of just (samples, labels).

Was this page helpful?
0 / 5 - 0 ratings