X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=pytorch.git;a=blobdiff_plain;f=ddpol.py;h=f33b0a1e08be94a8c7e0cbd158dc36c96fa68618;hp=1c5d1316e576d900f3cc1c58a16c71b2379de332;hb=c9b738deac0ba9378509e684273de90089a2f5d7;hpb=c75c1288649c1d4bbd941ba040367deffb5feccb diff --git a/ddpol.py b/ddpol.py index 1c5d131..f33b0a1 100755 --- a/ddpol.py +++ b/ddpol.py @@ -59,6 +59,8 @@ def fit_alpha(x, y, D, a = 0, b = 1, rho = 1e-12): ###################################################################### +# The "ground truth" + def phi(x): return torch.abs(torch.abs(x - 0.4) - 0.2) + x/2 - 0.1