[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
1a7b4ec890
commit
68b8e274dd
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
# TODO: (1) better device management
|
# TODO: (1) better device management
|
||||||
|
|
||||||
from copy import deepcopy
|
|
||||||
import math
|
import math
|
||||||
from typing import Callable, Optional, Tuple, Union, Dict, List
|
from typing import Callable, Optional, Tuple, Union, Dict, List
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -640,9 +639,9 @@ class Policy(nn.Module):
|
||||||
# Compute standard deviations
|
# Compute standard deviations
|
||||||
if self.fixed_std is None:
|
if self.fixed_std is None:
|
||||||
log_std = self.std_layer(outputs)
|
log_std = self.std_layer(outputs)
|
||||||
assert not torch.isnan(log_std).any(), (
|
assert not torch.isnan(
|
||||||
"[ERROR] log_std became NaN after std_layer!"
|
log_std
|
||||||
)
|
).any(), "[ERROR] log_std became NaN after std_layer!"
|
||||||
|
|
||||||
if self.use_tanh_squash:
|
if self.use_tanh_squash:
|
||||||
log_std = torch.tanh(log_std)
|
log_std = torch.tanh(log_std)
|
||||||
|
|
Loading…
Reference in New Issue