-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
File "imitation/algorithms/bc.py", line 495, in train
training_metrics = self.loss_calculator(self.policy, obs_tensor, acts)
File "imitation/algorithms/bc.py", line 146, in call
loss = neglogp + ent_loss + l2_loss
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
ent_loss = -self.ent_weight * (entropy if entropy is not None else th.zeros(1))
If entropy is None th.zeros(1) is at CPU when model is at CUDA
Steps to reproduce
Pretrain PPO model with use_sde=True
Environment
- OS: Ubuntu 22.04
- Python: 3.9
- Imitation: 1.0.1
- SB3: 2.2.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working