rail-berkeley / rlkit

Collection of reinforcement learning algorithms
MIT License
2.43k stars 547 forks source link

bug in tanhcnngaussianpolicy #139

Open Yuichi-Nakababayashi opened 3 years ago

Yuichi-Nakababayashi commented 3 years ago

TanhCNNGaussianPolicy class in gaussian_policy.py, following line may be incorrect.

self.last_fc_log_std = nn.Linear(last_hidden_size, action_dim)

as in case there're no hidden layers, last_hidden_size = self.input_width * self.input_width, wherase input dimension is not always the same as the dimension of CNN-output, which should be the same as the input dimension of the last layer.

Thought, I don't know a quick fix to that problem,,,