def METHOD_NAME(self, X, y):
    """Fit the classifier on the training set (X, y).
    Parameters
    ----------
    X : np.ndarray of shape = (n_instances (n), n_dimensions (d), series_length (m))
        The training input samples.
    y : np.ndarray of shape n
        The training data class labels.
    Returns
    -------
    self : object
    """
    y_onehot = self.convert_y_to_keras(y)
    # Transpose to conform to Keras input style.
    X = X.transpose(0, 2, 1)
    check_random_state(self.random_state)
    self.input_shape = X.shape[1:]
    self.model_ = self.build_model(self.input_shape, self.n_classes_)
    if self.verbose:
        self.model_.summary()
    callbacks = self._check_callbacks(self.callbacks)
    self.history = self.model_.fit(
        X,
        y_onehot,
        batch_size=self.batch_size,
        epochs=self.n_epochs,
        verbose=self.verbose,
        callbacks=deepcopy(callbacks) if callbacks else [],
    )
    return self