focal loss function help
From Focal Loss for Dense Object Detection paper, focal loss is defined as:

$$FL(p_t) = −(1 − p_t)^γ log(p_t)$$

It is a generalized formation of a loss function that can be directly implemented for any classification problem, including text classification.

Focal loss function is designed for problems with 1:1000 training imbalance. Does your data actually have that much imbalance? If not, you can use much simpler methods (i.e., resampling).