def get_accuracy(predictions, targets):
    """
    Calculates the accuracy for a set of prediction and targets.

    predictions
        Softmax'ed output values of the network.
    targets
        One hot target vectors
    """
    accuracy = (predictions.argmax(1).cpu().numpy() ==
                targets.cpu().numpy()).sum()/(predictions.shape[0])
    return accuracy