Which loss function in bertforsequenceclassification regression

Can you add parameters to the loss function through transformer? for example, add weights to each of the classes?