Could you review the entire code (psueducode).
class RNN(nn.Module):
    def __init__(self, ...):
        ...
        h_0 = torch.zeros((self.MiniBatchSize, self.HiddenNodes),
                          dtype=torch.double)
        self.h_0 = nn.Parameter(h_0)
        self.Lin1 = nn.Linear(InNodes , NumNodes)
        self.Lin2= nn.Linear(InNodes , NumNodes)
   def forward(self, data, hidden):
     if hidden == None:
         hidden = self.h_0
     aDat=torch.cat((data,hidden))
     kOut=Lin1(aDat)
     hidden=Lin2(aDat)
     return kOut,hidden

aModel=RNN()
hidden=None
while True:
     aData, aTruth=Minibatch
     for count in range(numSteps):
         kOut,hidden=aModel(aData[count],hidden)
     loss=criterion(kOut,aTruth)
     hidden.detach()