def db_get_loss(conn, experiment, fold):
    """
    Get loss of a model in db.

    Args:
        conn: Sqlite3 connection object.
        experiment: Experiment name.
        fold: Fold number.

    Returns:
        The loss of the model.
    """
    cur = conn.cursor()

    loss = cur.execute("SELECT loss FROM experiments WHERE experiment=? and fold=?", (experiment, fold)).fetchone()[0]

    return loss