Skip to content

Commit 61b937d

Browse files
committed
fix: do not add log_std to optimizer if none
1 parent 1e333af commit 61b937d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mighty/mighty_update/ppo_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
value_params = list(model.value_head.parameters())
5353

5454
extra_params = []
55-
if getattr(model, "continuous_action", False) and hasattr(model, "log_std"):
55+
if getattr(model, "continuous_action", False) and model.log_std is not None:
5656
extra_params.append(model.log_std)
5757

5858
self.optimizer = optim.Adam(

0 commit comments

Comments
 (0)