def get_nb_minibatches(nb_samples, batch_size):
    """Compute the number of minibatches for keras.

    See [https://keras.io/models/sequential]
    """
    return nb_samples // batch_size + (1 if nb_samples % batch_size > 0 else 0)
