def train_LeNet_model(model, trainX, trainY, testX, testY, n_epochs, batch_size):
    """
    This function trains the LeNet model on the training data and validates it on the test data.
    """
    # Train model
    H = model.fit(trainX, trainY, 
                  validation_data=(testX, testY), 
                  batch_size=batch_size, 
                  epochs=n_epochs, verbose=1)
    
    return H