Hello Tom,
I determined that I either put in the data incorrectly or there is an error in the training training. Could you look at my code to help find the error
Dataloader:
class Data(Dataset):
    def __init__(self):
        self.x = TrainData
        self.y = TrainOutput
        self.len = self.x.shape[0]

    def __getitem__(self, index):
        return self.x[index], self.y[index]

    def __len__(self):
        return self.len

trainloader = DataLoader(dataset = Data(), batch_size = 1, sampler = sampler)

Training:
for epoch in range(n_epochs):
    model.train(True)
    


    running_loss = 0.
    last_loss = 0.
    for i, xy in enumerate(trainloader):
        x, y = xy
        optimizer.zero_grad()
        z = model(x)
        loss = Loss(z, y)
        loss.backward()
        optimizer.step()
        loss_list.append(loss.data)
        running_loss += loss.item()
        test[y] += 1
        if i % 1000 == 999:
            last_loss = running_loss / 1000 # loss per batch
            running_loss = 0.
    
    print("Epoch is", epoch)
    epoch_number += 1

Model:
class Net(nn.Module):
    def __init__(self, D_in, H1, H2, D_out):
        super(Net, self).__init__()
        self.linear1 = nn.Linear(D_in, H1)
        self.linear2 = nn.Linear(H1, H2)
        self.linear4 = nn.Linear(H2, D_out)

    def forward(self, x):
        x = f.relu(self.linear1(x))
        x = f.relu(self.linear2(x))
        x = self.linear4(x)
        return x

Here is what the variables are.
TrainData:
Shape: torch.Size([50316, 2])
Value: tensor([[ 6.5819e+03, 3.5400e+00], [ 3.4742e+03, 9.2000e-02], [ 5.3910e+03, 3.6600e+00], ..., [ 3.6822e+03, -3.1800e-01], [ 6.2419e+03, 3.2160e+00], [ 5.6387e+03, 1.4360e+01]])

TrainOutput:
Shape: torch.Size([50316])
Value: tensor([6, 4, 5, ..., 4, 6, 8])

Thanks,
Rishav