Hi,
I am totally new to PyTorch and I have a question regarding the optimization using SGD.  I would like to distribute n points on the surface of a unit sphere in 5D space. for generating random points I use:
points = torch.randn((npoints, dim), requires_grad=True)
I would like to optimize these points using torch.optim.sgd() and I need to define a proper loss function for this problem in order to be used for loss. backward().
torch.optim.SGD([points], lr=0.001)
for comparing the quality of optimization I calculate the k nearest neighbors and also the standard deviation for that array.
I would appreciate any help in this regard.