def rfun(p): return generic_resid_fun(implicit_softmax_affine, xdata, ydata, p)
def rfun(p): return generic_resid_fun(max_affine, xdata, ydata, p)