fix minor

This commit is contained in:
Baek JeongHun 2019-04-12 11:57:00 +00:00
parent 73f42c7207
commit 81d381701f
1 changed files with 3 additions and 2 deletions

View File

@ -92,8 +92,9 @@ class GridGenerator(nn.Module):
self.inv_delta_C = torch.tensor(self._build_inv_delta_C(self.F, self.C)).float() # F+3 x F+3 self.inv_delta_C = torch.tensor(self._build_inv_delta_C(self.F, self.C)).float() # F+3 x F+3
self.P_hat = torch.tensor(self._build_P_hat(self.F, self.C, self.P)).float() # n x F+3 self.P_hat = torch.tensor(self._build_P_hat(self.F, self.C, self.P)).float() # n x F+3
self.register_buffer("batch_inv_delta_C", self.inv_delta_C.repeat(batch_size, 1, 1)) # batch_size+1 : +1 sometimes happen with specific batch_ratio and multi-GPU setting.
self.register_buffer("batch_P_hat", self.P_hat.repeat(batch_size, 1, 1)) self.register_buffer("batch_inv_delta_C", self.inv_delta_C.repeat(batch_size + 1, 1, 1))
self.register_buffer("batch_P_hat", self.P_hat.repeat(batch_size + 1, 1, 1))
def _build_C(self, F): def _build_C(self, F):
""" Return coordinates of fiducial points in I_r; C """ """ Return coordinates of fiducial points in I_r; C """