We already had a thread at

  
    
    
    `class_weight` not supported for 3+ dimensional targets General Discussion
  
  
    Dear everyone: 
I’m new to tensorflow.  The coding as follows: 
def train_model(self): 
checkpoint = ModelCheckpoint(self.PATH, monitor=‘val_loss’, verbose=1, save_best_only=True, mode=‘auto’) 
if self.modality == “audio”: 
model = self.get_audio_model() 
model.compile(optimizer=‘adadelta’, loss=‘categorical_crossentropy’, sample_weight_mode=‘temporal’) 
elif self.modality == “text”: 
model = self.get_text_model() 
model.compile(optimizer=‘adadelta’, loss=‘categorical_crossentropy’, sample_weigh…