def compute_inception_score_from_dataset(dataset,
                                         splits,
                                         batch_size,
                                         device=torch.device('cuda'),
                                         inception_model=None,
                                         disable_tqdm=False):
    """
    Args:
        - dataset: dataset returning **float (0~1)** images
    """
    if inception_model is None:
        inception_model = get_inception_model().to(device)

    data_loader = DataLoader(dataset, shuffle=True, batch_size=batch_size, num_workers=16)

    inception_model.eval()
    probs_list = []

    for imgs in tqdm(data_loader, disable=disable_tqdm):
        imgs = imgs[0].to(device)
        logits = inception_model.get_logits(imgs)
        probs = torch.nn.functional.softmax(logits, dim=-1)
        probs_list.append(probs)

    probs_list = torch.cat(probs_list, 0)
    m_scores, m_std = calculate_kl_div(probs_list, splits=splits)

    return m_scores, m_std

    Args:
        - dataset: dataset returning **float (0~1)** images
    
LatentLM/metrics/IS.py