MCPcopy Create free account
hub / github.com/MotrixLab/insactor / _data_pmap

Function _data_pmap

diffmimic/brax_lib/agent_diffmimic.py:61–66  ·  view source on GitHub ↗
(v, local_devices_to_use)

Source from the content-addressed store, hash-verified

59
60
61def _data_pmap(v, local_devices_to_use):
62 # devices = jax.local_devices()
63 # v = v.reshape((local_devices_to_use, v.shape[0] // local_devices_to_use,) + v.shape[1:])
64 # v = [jnp.array(v[i]) for (i, device) in enumerate(devices)]
65 # return jax.device_put_sharded(v, devices)
66 return v.reshape((local_devices_to_use, v.shape[0]//local_devices_to_use,) + v.shape[1:])
67
68
69def train(environment: envs.Env,

Callers 1

trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected