Hello, everyone,
Since my training samples have different importance, I wonder how to use this information in the training pass.
For example, I have a function to assign each individual sample an importance  factor, the first idea that comes to my mind is to scale the gradients according to this factor, which emphasizes some samples. However, I think this is quite difficult to implement since pytorch averages the loss at the mini-batch level.
Do you have any suggestions? Thanks.
Best Regards,
Shuai.