mirror of
https://github.com/Laurent2916/REVA-QCAV.git
synced 2024-11-08 14:39:00 +00:00
Corrected class Up for model to ONNX exporting
Former-commit-id: 2dceff8c909b16530e1291118a2165ea95744afd
This commit is contained in:
parent
c0adecd5d6
commit
70e6ac4258
|
@ -54,8 +54,8 @@ class Up(nn.Module):
|
||||||
def forward(self, x1, x2):
|
def forward(self, x1, x2):
|
||||||
x1 = self.up(x1)
|
x1 = self.up(x1)
|
||||||
# input is CHW
|
# input is CHW
|
||||||
diffY = x2.size()[2] - x1.size()[2]
|
diffY = torch.tensor([x2.size()[2] - x1.size()[2]])
|
||||||
diffX = x2.size()[3] - x1.size()[3]
|
diffX = torch.tensor([x2.size()[3] - x1.size()[3]])
|
||||||
|
|
||||||
x1 = F.pad(x1, [diffX // 2, diffX - diffX // 2,
|
x1 = F.pad(x1, [diffX // 2, diffX - diffX // 2,
|
||||||
diffY // 2, diffY - diffY // 2])
|
diffY // 2, diffY - diffY // 2])
|
||||||
|
|
Loading…
Reference in a new issue