Weighted samples in Tensorflow for convolutional neural networks For my binary classification problem (A vs B),  each image in either class has its individual weight. This means, for example, if I have 10000 images for A, not all of the images are equally important. Weight of &quot;0.9&quot; would mean it is very important, and a weight of &quot;0.01&quot; means that it is not that important.
Can this information be communicated to the training in Tensorflow?
Thanks for the help.
Same as in case of the weighted classes, you have to account on sample weights in your loss function.

If you use Tensorflow in combination with Keras, you can simply use the sample_weight argument of the model.fit function.

As an alternative, you can implement your own loss function. However, 
depending on your setup/framework it can get tricky to determine sample indices from inside the loss function.