def entropy(self, prob):
        '''
            Method computes entropy of a given probability (prob)
        '''
        if len(prob.size()) == 3:
            prob = prob.view(-1, 2 * self.d)

        std_nd = prob[:, self.d:]
        return 0.5 * std_nd.log().sum(dim=1) + .5 * np.log(2 * np.pi * np.e) * self.d

            Method computes entropy of a given probability (prob)
        
surreal/model/ppo_net.py