Hm sry I am quite new what exactly do you mean by clip probs_2d ??? How would I do that?
like this?:

        probs = self.network(torch.FloatTensor(state))
        probs = probs * legalCards
        probs =   torch.nn.utils.clip_grad_norm_(probs , 5)
        distribution = Categorical(probs)