Ali_Aghababaei:

Imagine that I have a multi-class, multi-label classification problem; my imbalanced one-hot coded dataset includes 1000 images with 4 labels with the following frequencies: class 0: 600, class 1: 550, class 2: 200, class 3: 100.


You mentioned that you have 1000 images, per se, my training data have around 10000 images and validation data have 5000 images.  So would the calculation of pos_weights and class_weight differ for validation and training dataset?
Or the 1000 images refer to the number of samples present in a batch?



 Ali_Aghababaei:

Also, regarding my first post, was the way of calculating the pos_weight tensor in the case of a binary target correct?


Did you use any other approach for calculating the pos_weights?