浏览代码

Fixing .contiguous missing in resnet

/MLA-1734-demo-provider
vincentpierre 4 年前
当前提交
8c1a33a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/torch/encoders.py

2
ml-agents/mlagents/trainers/torch/encoders.py


if not exporting_to_onnx.is_exporting():
visual_obs = visual_obs.permute([0, 3, 1, 2])
batch_size = visual_obs.shape[0]
hidden = self.sequential(visual_obs)
hidden = self.sequential(visual_obs).contiguous()
before_out = hidden.view(batch_size, -1)
return torch.relu(self.dense(before_out))
正在加载...
取消
保存