-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Move normalization to policy for act and diffusion #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move normalization to policy for act and diffusion #90
Conversation
# Normalization / Unnormalization | ||
normalize_input_modes: dict[str, str] = { | ||
"observation.image": "mean_std", | ||
"observation.state": "min_max", | ||
} | ||
unnormalize_output_modes: dict[str, str] = { | ||
"action": "min_max", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Cadene nice! This makes things a lot cleaner. I'm in agreement with your approach and have left some minor passing comments. Looking forward to reviewing the final PR.
cf45d92
to
42ed7bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this PR Remi. Super clean design. I left some comments, and I think for some it might make sense for me to contribute to the PR a bit.
""" | ||
|
||
# Environment. | ||
# TODO(rcadene, alexander-soar): remove these as they are defined in input_shapes, output_shapes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self so I don't forget. I will contribute to this PR to do this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved after you merge my PR
Co-authored-by: Alexander Soare <[email protected]>
Co-authored-by: Alexander Soare <[email protected]>
Co-authored-by: Alexander Soare <[email protected]>
Co-authored-by: Alexander Soare <[email protected]>
What does this PR do?
stats.pth
dataset_stats
argument to policiesdataset_stats=dataset.stats
dataset_stats=None
since the stats are insidepolicy.state_dict()
transform
datasets/factory.py
envs/utils.py
transforms.py
input_shapes
,output_shapes
,normalize_input_modes
,unnormalize_output_modes
in config yaml andconfiguration_POLICY.py
input_shapes
andoutput_shapes
can also be used to instantiate thenn.Module
of the policy, but I left this for future PRpolicies/normalize.py
containingNormalize
andUnnormalize
, which arenn.Module
of the policytest_policies.py::test_normalize
How was it tested?
CI + breakpoint