import torch


def predict_raw(loader, model):
    """Compute the raw output of the neural network model for the given data.
    
    Arguments
    ----------
    loader : pyTorch DataLoader instance
        An instance of DataLoader class that supplies the data.
    model: subclass instance of pyTorch nn.Module
        The class containing the network model to evaluate, as per convention.
    
    Returns
    ----------
    The network output tensor.
    
    """
    model.eval()
    out = []
    for i, (input, target) in enumerate(loader):
        input = input.cuda(non_blocking=True)
        target = target.cuda(non_blocking=True)
        with torch.no_grad():
            input_var = torch.autograd.Variable(input)

        # compute output
        output = model(input_var)
        out.append(output.data)
    return out