project gradient descent works

for this kind of data with one degree of freedom, better to choose dim=1