Skip to content

Commit

Permalink
fix bug in state switching env
Browse files Browse the repository at this point in the history
  • Loading branch information
1b15 committed Jun 12, 2024
1 parent 2b7676e commit 1e1520b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def reset(self, seed=None, options=None):
def _loss(self, obs, action):
control_loss = abs(self.targetstate[0] - obs["exc"].item()) + abs(self.targetstate[1] - obs["inh"].item())
control_strength_loss = np.abs(action).sum() * self.l1_control_strength_loss_scale
control_strength_loss += np.sqrt(np.sum(action**2)) * self.l2_control_strength_loss_scale
control_strength_loss += np.sqrt(np.sum(np.square(action))) * self.l2_control_strength_loss_scale
return control_loss + control_strength_loss

def step(self, action):
Expand Down

0 comments on commit 1e1520b

Please sign in to comment.