Skip to content

Commit

Permalink
remove clip ceiling
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyzhaozh authored Sep 5, 2023
1 parent 5509845 commit 694c606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def get_norm_stats(dataset_dir, num_episodes):
# normalize action data
action_mean = all_action_data.mean(dim=[0, 1], keepdim=True)
action_std = all_action_data.std(dim=[0, 1], keepdim=True)
action_std = torch.clip(action_std, 1e-2, 10) # clipping
action_std = torch.clip(action_std, 1e-2, np.inf) # clipping

# normalize qpos data
qpos_mean = all_qpos_data.mean(dim=[0, 1], keepdim=True)
qpos_std = all_qpos_data.std(dim=[0, 1], keepdim=True)
qpos_std = torch.clip(qpos_std, 1e-2, 10) # clipping
qpos_std = torch.clip(qpos_std, 1e-2, np.inf) # clipping

stats = {"action_mean": action_mean.numpy().squeeze(), "action_std": action_std.numpy().squeeze(),
"qpos_mean": qpos_mean.numpy().squeeze(), "qpos_std": qpos_std.numpy().squeeze(),
Expand Down

0 comments on commit 694c606

Please sign in to comment.