import torch


def convert_to_numpy(input, target):
    """
    Coverts input and target torch tensors to numpy ndarrays

    Args:
        input (torch.Tensor): 5D torch tensor
        target (torch.Tensor): 5D torch tensor

    Returns:
        tuple (input, target) tensors
    """
    assert isinstance(input, torch.Tensor), "Expected input to be torch.Tensor"
    assert isinstance(target, torch.Tensor), "Expected target to be torch.Tensor"

    input = input.detach().cpu().numpy()  # 5D
    target = target.detach().cpu().numpy()  # 5D

    return input, target