|
|
|
|
|
|
self.policy.actor_critic.network_body.visual_processors |
|
|
|
): |
|
|
|
visual_ob = ModelUtils.list_to_tensor(batch["visual_obs%d" % idx]) |
|
|
|
visual_obs.append(visual_ob) |
|
|
|
# Make sure to permute visual obs, as PyTorch uses NCHW |
|
|
|
visual_obs.append(visual_ob.permute([0, 3, 1, 2])) |
|
|
|
else: |
|
|
|
visual_obs = [] |
|
|
|
|
|
|
|
|
|
|
ModelUtils.list_to_tensor(vec_vis_obs.vector_observations).unsqueeze(0) |
|
|
|
] |
|
|
|
next_vis_obs = [ |
|
|
|
ModelUtils.list_to_tensor(_vis_ob).unsqueeze(0) |
|
|
|
ModelUtils.list_to_tensor(_vis_ob).unsqueeze(0).permute([0, 3, 1, 2]) |
|
|
|
for _vis_ob in vec_vis_obs.visual_observations |
|
|
|
] |
|
|
|
|
|
|
|