File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ def __init__(
79
79
if self .noise_std_type == "scalar" :
80
80
torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], init_noise_std )
81
81
elif self .noise_std_type == "log" :
82
- torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], torch .log (torch .tensor (init_noise_std + 1e-7 )))
82
+ torch .nn .init .constant_ (
83
+ self .actor [- 2 ].bias [num_actions :], torch .log (torch .tensor (init_noise_std + 1e-7 ))
84
+ )
83
85
else :
84
86
raise ValueError (f"Unknown standard deviation type: { self .noise_std_type } . Should be 'scalar' or 'log'" )
85
87
else :
Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ def __init__(
95
95
if self .noise_std_type == "scalar" :
96
96
torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], init_noise_std )
97
97
elif self .noise_std_type == "log" :
98
- torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], torch .log (torch .tensor (init_noise_std + 1e-7 )))
98
+ torch .nn .init .constant_ (
99
+ self .actor [- 2 ].bias [num_actions :], torch .log (torch .tensor (init_noise_std + 1e-7 ))
100
+ )
99
101
else :
100
102
raise ValueError (f"Unknown standard deviation type: { self .noise_std_type } . Should be 'scalar' or 'log'" )
101
103
else :
You can’t perform that action at this time.
0 commit comments