I tried to follow the tutorial, but it still reported an error as follows: ValueError: class_weight not supported for 3+ dimensional targets.
the coding： class_weight={0: 4, 1: 15, 2: 15, 3: 3, 4: 1, 5: 6, 6: 3}，the error is ValueError: class_weight not supported for 3+ dimensional targets.
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_weight_mode='temporal')
	elif self.modality == "bimodal":
		model = self.get_bimodal_model()
		model.compile(optimizer='adam', loss='categorical_crossentropy', sample_weight_mode='temporal')

	early_stopping = EarlyStopping(monitor='val_loss', patience=10)
	model.fit(self.train_x, self.train_y,
	                epochs=self.epochs,
	                batch_size=self.batch_size,
	                sample_weight=self.train_mask,
	                shuffle=True, 
	                class_weight=class_weight,
	                callbacks=[early_stopping, checkpoint],
	                validation_data=(self.val_x, self.val_y, self.val_mask))

	self.test_model()