Fix an example code in readme (#1011)

Simple fix of an error
This commit is contained in:
Michael Yang 2023-12-15 01:46:56 -05:00 committed by GitHub
parent b7df31f2a7
commit 294145aa3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,7 +261,7 @@ result = ts.trainer.OffpolicyTrainer(
step_per_collect=step_per_collect,
episode_per_test=test_num,
batch_size=batch_size,
update_per_step=update_per_step=1 / step_per_collect,
update_per_step=1 / step_per_collect,
train_fn=lambda epoch, env_step: policy.set_eps(eps_train),
test_fn=lambda epoch, env_step: policy.set_eps(eps_test),
stop_fn=lambda mean_rewards: mean_rewards >= env.spec.reward_threshold,