def tensor2array(value_tensor):
    """Converts a Tensor array into a numpy
    :param value_tensor:
    :return:
    """
    if value_tensor.dim() == 3:
        numpy = value_tensor.view(-1).cpu().float().numpy()
    else:
        numpy = value_tensor[0].view(-1).cpu().float().numpy()
    return numpy