spikingjelly.activation_based.examples.common package

Submodules

spikingjelly.activation_based.examples.common.multiprocessing_env module

spikingjelly.activation_based.examples.common.multiprocessing_env.worker(remote, parent_remote, env_fn_wrapper)[源代码]
class spikingjelly.activation_based.examples.common.multiprocessing_env.VecEnv(num_envs, observation_space, action_space)[源代码]

基类:object

An abstract asynchronous, vectorized environment.

reset()[源代码]

Reset all the environments and return an array of observations, or a tuple of observation arrays. If step_async is still doing work, that work will be cancelled and step_wait() should not be called until step_async() is invoked again.

step_async(actions)[源代码]

Tell all the environments to start taking a step with the given actions. Call step_wait() to get the results of the step. You should not call this if a step_async run is already pending.

step_wait()[源代码]

Wait for the step taken with step_async(). Returns (obs, rews, dones, infos):

  • obs: an array of observations, or a tuple of

    arrays of observations.

  • rews: an array of rewards

  • dones: an array of “episode done” booleans

  • infos: a sequence of info objects

close()[源代码]

Clean up the environments’ resources.

step(actions)[源代码]
class spikingjelly.activation_based.examples.common.multiprocessing_env.CloudpickleWrapper(x)[源代码]

基类:object

Uses cloudpickle to serialize contents (otherwise multiprocessing tries to use pickle)

class spikingjelly.activation_based.examples.common.multiprocessing_env.SubprocVecEnv(env_fns, spaces=None)[源代码]

基类:VecEnv

envs: list of gym environments to run in subprocesses

step_async(actions)[源代码]
step_wait()[源代码]
reset()[源代码]
reset_task()[源代码]
close()[源代码]

Module contents