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__(
7979 if self .noise_std_type == "scalar" :
8080 torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], init_noise_std )
8181 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+ )
8385 else :
8486 raise ValueError (f"Unknown standard deviation type: { self .noise_std_type } . Should be 'scalar' or 'log'" )
8587 else :
Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ def __init__(
9595 if self .noise_std_type == "scalar" :
9696 torch .nn .init .constant_ (self .actor [- 2 ].bias [num_actions :], init_noise_std )
9797 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+ )
99101 else :
100102 raise ValueError (f"Unknown standard deviation type: { self .noise_std_type } . Should be 'scalar' or 'log'" )
101103 else :
You can’t perform that action at this time.
0 commit comments