Traceback (most recent call last):


 "scripts/run_goal_conditioned_policy.py", line 60, in <module>

simulate_policy(args)


 "scripts/run_goal_conditioned_policy.py", line 15, in simulate_policy

policy = data['trainer/policy']


 "/home/yunchuz/rlkit/rlkit/samplers/rollout_functions.py", line 41, in multitask_rollout

a, agent_info = agent.get_action(new_obs, **get_action_kwargs)


 "/home/yunchuz/rlkit/rlkit/torch/sac/policies.py", line 63, in get_action

actions = self.get_actions(obs_np[None], deterministic=deterministic)


 "/home/yunchuz/rlkit/rlkit/torch/sac/policies.py", line 67, in get_actions

return eval_np(self, obs_np, deterministic=deterministic)[0]


 "/home/yunchuz/rlkit/rlkit/torch/core.py", line 18, in eval_np

outputs = module(*torch_args, **torch_kwargs)


 "/home/yunchuz/miniconda3/envs/rlkit/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__

result = self.forward(*input, **kwargs)


 "/home/yunchuz/rlkit/rlkit/torch/sac/policies.py", line 83, in forward

h = self.hidden_activation(fc(h))


 "/home/yunchuz/miniconda3/envs/rlkit/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__

result = self.forward(*input, **kwargs)


 "/home/yunchuz/miniconda3/envs/rlkit/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 87, in forward

return F.linear(input, self.weight, self.bias)


 "/home/yunchuz/miniconda3/envs/rlkit/lib/python3.6/site-packages/torch/nn/functional.py", line 1370, in linear

ret = torch.addmm(bias, input, weight.t())
RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'mat1' in call to _th_addmm

Traceback (most recent call last):


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/tools/train.py", line 154, in <module>

main()


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/tools/train.py", line 150, in main

train(cfg)


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/tools/train.py", line 68, in train

start_epoch
# add for using self trained model


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/engine/trainer.py", line 208, in do_train

trainer.run(train_loader, max_epochs=epochs)


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 326, in run

self._handle_exception(e)


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 291, in _handle_exception

raise e


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 313, in run

hours, mins, secs = self._run_once_on_dataset()


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 280, in _run_once_on_dataset

self._handle_exception(e)


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 291, in _handle_exception

raise e


 "/usr/local/lib/python3.5/dist-packages/ignite/engine/engine.py", line 272, in _run_once_on_dataset

self.state.output = self._process_function(self, batch)


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/engine/trainer.py", line 47, in _update

loss = loss_fn(score, feat, target)


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/layers/__init__.py", line 35, in loss_func

return xent(score, target) + triplet(feat, target)[0]


 "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 541, in __call__

result = self.forward(*input, **kwargs)


 "/media/ehsan/48BE4782BE476810/AA_GITHUP/forked_reid_baseline/layers/triplet_loss.py", line 154, in forward

targets = torch.zeros(log_probs.size()).scatter_(1, targets.unsqueeze(1).data.cpu(), 1)
RuntimeError: Invalid index in scatter at /pytorch/aten/src/TH/generic/THTensorEvenMoreMath.cpp:151
