mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-06-02 14:45:25 +08:00
Replace jnp.DeviceArray with the new public type jax.Array.
PiperOrigin-RevId: 477558995
This commit is contained in:
committed by
Diego de las Casas
parent
58fb45db7e
commit
da0f2de14d
+1
-2
@@ -338,8 +338,7 @@ class TandemDqn(parts.Agent):
|
|||||||
def statistics(self) -> Mapping[Text, float]:
|
def statistics(self) -> Mapping[Text, float]:
|
||||||
"""Returns current agent statistics as a dictionary."""
|
"""Returns current agent statistics as a dictionary."""
|
||||||
# Check for DeviceArrays in values as this can be very slow.
|
# Check for DeviceArrays in values as this can be very slow.
|
||||||
assert all(
|
assert all(not isinstance(x, jax.Array) for x in self._statistics.values())
|
||||||
not isinstance(x, jnp.DeviceArray) for x in self._statistics.values())
|
|
||||||
return self._statistics
|
return self._statistics
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user