How to use class wieghts in fit_generator for multi-dim tensor

Hi all,
I want to use trainable wieghts for the classes in a 5 dimentional tensor (batch size, 60,36,60, 12), the last chanel for sematic labels, the 60,36,60 is one hot coding. I need to add weights for the ones only in the volume 60,36,60. How can I do it in the fit_generator? I am using tensorflow 1.9

your advice is appreciated