def pytorch_net(net):
    """
    :param net: a Pytorch model
    :return: Pytorch network model whose predictions are returned as numpy array
    """

    def net_wrapper(input):
        predictions = net(input)
        return predictions.detach().cpu().numpy()

    return net_wrapper