def get_optimizer_momentum_list(optimizer: TorchOptimizer) -> List[Union[float, None]]:
    """Get list of optimizer momentums (for each param group)

    Args:
        optimizer: PyTorch optimizer

    Returns:
        momentum_list (List[Union[float, None]]): momentum for each param group
    """
    result = []

    for param_group in optimizer.param_groups:
        betas = param_group.get("betas", None)
        momentum = param_group.get("momentum", None)
        result.append(betas[0] if betas is not None else momentum)

    return result
Get list of optimizer momentums (for each param group)

    Args:
        optimizer: PyTorch optimizer

    Returns:
        momentum_list (List[Union[float, None]]): momentum for each param group
    
catalyst/utils/torch.py