import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
SKX= np.zeros(10000)
for i in range(10000):
SKX[i] = np.random.randint(100)
SKY = np.zeros(10000)
for i in range(10000):
SKY[i] = SKX[i]*5
class NN_new(nn.Module):
def init(self, input_shape, n_actions):
super(DQN_new, self).init()
self.fc = nn.Sequential(
nn.Linear(input_shape, 128),
nn.ReLU(),
nn.Linear(128, 256),
nn.ReLU(),
nn.Linear(256, 128),
nn.ReLU(),
nn.Linear(128, n_actions)
)
def forward(self, x):
    return self.fc(x.view(-1,1))

SKnet = NN_new(1,1)
def fit(x,y,net,opt,loss_function,epochs = 1000):
for epoch in range(epochs):
opt.zero_grad()
loss = loss_function(SKnet(x.float()),y.float())
print(epoch,loss)
loss.backward()
opt.step()
return loss.item()

loss_function = nn.MSELoss()
opt = optim.RMSprop(SKnet.parameters(), lr = 0.01)
fit(torch.tensor(SKX), torch.tensor(SKY), SKnet, opt, loss_function)
model not converging what will be the problem?