Weighing Training Data for Keras
Solution 1:
The fit
function of of a keras model accepts an optional argument sample_weight
that does exactly what you're looking for. More specifically from keras documentation:
sample_weight: Optional Numpy array of weights for the training samples, used for weighting the loss function (during training only).