mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-02-05 19:26:22 +08:00
Silence some pytype errors.
PiperOrigin-RevId: 515579955
This commit is contained in:
committed by
Saran Tunyasuvunakool
parent
784f67565e
commit
0824c28deb
@@ -291,6 +291,7 @@ class NormilizeActionSpecWrapper(wrappers.EnvironmentWrapper):
|
||||
super().__init__(environment)
|
||||
|
||||
action_spec = environment.action_spec()
|
||||
# pytype: disable=attribute-error # always-use-return-annotations
|
||||
self._scale = action_spec.maximum - action_spec.minimum
|
||||
self._offset = action_spec.minimum
|
||||
|
||||
@@ -302,6 +303,7 @@ class NormilizeActionSpecWrapper(wrappers.EnvironmentWrapper):
|
||||
minimum,
|
||||
maximum,
|
||||
name=action_spec.name)
|
||||
# pytype: enable=attribute-error # always-use-return-annotations
|
||||
|
||||
def _from_normal_actions(self, actions):
|
||||
actions = 0.5 * (actions + 1.0) # a_t is now in the range [0, 1]
|
||||
|
||||
Reference in New Issue
Block a user