MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / make_env

Function make_env

rl3/a2c/main.py:34–44  ·  view source on GitHub ↗
(rank)

Source from the content-addressed store, hash-verified

32
33def train(env_id, num_timesteps, num_cpu):
34 def make_env(rank):
35 def _thunk():
36 env = make_atari(env_id)
37 env.seed(SEED + rank)
38 gym.logger.setLevel(logging.WARN)
39 env = wrap_deepmind(env)
40
41 # wrap the env one more time for getting total reward
42 env = Monitor(env, rank)
43 return env
44 return _thunk
45
46 env = SubprocVecEnv([make_env(i) for i in range(num_cpu)])
47 learn(CNN, env, SEED, total_timesteps=int(num_timesteps * 1.1))

Callers 1

trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected