How to determine the sample weights for the loss function

In the video ’ When to Change Dev/Test Sets and Metrics?’ A.N. talks about weighting the samples by a factor of w(i). For example giving porn images weight 1 and normal 10. Then using these weights in training within the loss function. But how to determine these weights? Are you suggesting to train a porn/not-porn classifier a priori?

Hey @andree, welcome to the DLS discussion forums :slight_smile:

The assumption is that you already have some intuition about the data distribution of your training set, so you may assign some weight to each target label.

Ok, thanks, makes sense.