mirror of
https://github.com/Laurent2916/REVA-QCAV.git
synced 2024-11-09 15:02:03 +00:00
Merge pull request #167 from HansBambel/master
diffX and diffY is now an int instead of a Tensor Former-commit-id: d66f2c3d35c1c7dc58c6d35c6ee6aa05cacfbccf
This commit is contained in:
commit
74a3f2496f
|
@ -57,8 +57,8 @@ class Up(nn.Module):
|
|||
def forward(self, x1, x2):
|
||||
x1 = self.up(x1)
|
||||
# input is CHW
|
||||
diffY = torch.tensor([x2.size()[2] - x1.size()[2]])
|
||||
diffX = torch.tensor([x2.size()[3] - x1.size()[3]])
|
||||
diffY = x2.size()[2] - x1.size()[2]
|
||||
diffX = x2.size()[3] - x1.size()[3]
|
||||
|
||||
x1 = F.pad(x1, [diffX // 2, diffX - diffX // 2,
|
||||
diffY // 2, diffY - diffY // 2])
|
||||
|
|
Loading…
Reference in a new issue