Skip to content

Commit

Permalink
a little ugly fix for multi-gpu training
Browse files Browse the repository at this point in the history
  • Loading branch information
shunsukesaito committed Jun 2, 2020
1 parent 95c6a10 commit 925eb89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/data/TrainDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def get_item(self, index):
# rot = render_data['calib'][0,:3, :3]
# trans = render_data['calib'][0,:3, 3:4]
# pts = torch.addmm(trans, rot, sample_data['samples'][:, sample_data['labels'][0] > 0.5]) # [3, N]
# pts = 0.5 * (pts.numpy().T + 1.0) * 512
# pts = 0.5 * (pts.numpy().T + 1.0) * render_data['img'].size(2)
# for p in pts:
# img = cv2.circle(img, (p[0], p[1]), 2, (0,255,0), -1)
# cv2.imshow('test', img)
Expand Down
4 changes: 2 additions & 2 deletions lib/model/SurfaceClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def forward(self, feature):
tmpy = feature
for i, f in enumerate(self.filters):
if self.no_residual:
y = f(y)
y = self._modules['conv' + str(i)](y)
else:
y = f(
y = self._modules['conv' + str(i)](
y if i == 0
else torch.cat([y, tmpy], 1)
)
Expand Down

0 comments on commit 925eb89

Please sign in to comment.