Update networks for continuous control

This commit is contained in:
Shangtong Zhang committed 2018-04-25 21:26:58 -06:00
1 parent 4f2903eb8f
commit ceea0a474b
4 files changed
+85 -135

No files matched your search

+2 -1
View File
@@ -110,7 +110,8 @@ class CategoricalActorCriticWrapper:
def load_state_dict(self, state_dicts):
self.network.load_state_dict(state_dicts)
def layer_init(layer):
def layer_init(layer, w_scale=1.0):
nn.init.orthogonal_(layer.weight.data)
layer.weight.data.mul_(w_scale)
nn.init.constant_(layer.bias.data, 0)
return layer