tidy typos

This commit is contained in:
wassname
2018-01-18 16:50:04 +08:00
parent 0de68133cf
commit 865b2a03b7
3 changed files with 8 additions and 6 deletions
+2
View File
@@ -1,3 +1,5 @@
outputs/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
+1 -1
View File
@@ -121,7 +121,7 @@ def create_act_update_fns(actor, critic, dynamics, target_actor, target_critic,
next_observations_pred = dynamics(observations, actions)
dynamics_loss = criterion(
next_observations_pred,
to_tensor(next_obsno proervations),
to_tensor(next_observations),
weights=torch.stack([weights, weights, weights], 1)
)
dynamics.zero_grad()
+5 -5
View File
@@ -194,12 +194,12 @@ def train(args, model_fn, act_update_fns, multi_thread, train_single, play_singl
processes = []
best_reward = Value("f", 0.0)
# debugging
args.thread = 1
multi_thread(actor, critic, dynamics, target_actor, target_critic, target_dynamics, args, act_update_fns, best_reward)
try:
if args.num_threads == args.num_train_threads:
if args.num_threads == args.num_train_threads == 1:
# run a single thread in the foreground so we can debug easier
args.thread = 1
multi_thread(actor, critic, dynamics, target_actor, target_critic, target_dynamics, args, act_update_fns, best_reward)
elif args.num_threads == args.num_train_threads:
for rank in range(args.num_threads):
args.thread = rank
p = mp.Process(