ShangtongZhang / DeepRL

Modularized Implementation of Deep RL Algorithms in PyTorch
MIT License
3.21k stars 684 forks source link

entropy term in continuous spaces? #43

Closed TomLin closed 6 years ago

TomLin commented 6 years ago

Hello Shangtong,

Sorry for bothering you, it's more a question of the code clarification instead of an bug issue. I am a bit confused on how you define the entropy in class GaussianActorCriticNet(nn.Module, BaseNet). The final return is tensor(np.zeros((log_prob.size(0), 1))) for entropy. Does that mean we just define the entropy term as zeros in this case.

Thanks again for any help.

ShangtongZhang commented 6 years ago

I assume a fixed unit variance, which means the entropy is a constant and does not depend on the parameters. So I leave it as 0.

TomLin commented 6 years ago

Thanks for the response!!