Hello Prudvinath!



 reddymap:

def getAction2(self, state):
        state = torch.FloatTensor(state)
        logits, _ = self.model2.forward(state)
        dist = F.softmax(logits, dim = -1)
        probs = Categorical(dist)
        return probs.sample()

The error
  File "C:/Users/Prudhvinath.DESKTOP-09Q8801/sciebo/Thesis/JSSP/TwoAgents/20JobsTwoAgents.py", line 164, in getAction1
    return probs.sample()

RuntimeError: invalid multinomial distribution (encountering probability entry < 0)



Your error message says that the error occurs “in getAction1,”
but you’ve posted code for def getAction2(self, state).
Could you double-check whether the code you’ve posted is
relevant to your error?
(Also, when your error gives a line number, “line 164,” it would
be helpful if you could flag the line in question when you post your
code so we can be sure of what we’re looking at.)
Best.
K. Frank