losses=[]
scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=30, gamma=0.1)
for t in range(2000):
    optimizer.zero_grad()   # clear gradients for next train
    prediction = net(X)     # input x and predict based on x
    

    loss = loss_func(prediction, y)   

    
    loss.backward()         # backpropagation, compute gradients
    optimizer.step()        # apply gradients
    scheduler.step()      # change learning rate on every 30th iteration 

    if t % 5 == 0:
        losses.append(loss.data.numpy())

I already tried both ways but but still loss and prediction doesn’t change .
I think need some transformation over data.